1 Reply Latest reply on Oct 28, 2009 8:07 AM by genaganna

    FIX for; brtvector.hpp compile error in gcc 4.3.3

    frankas
      Correction to brook SDK 1.4 header file

      In file included from /usr/local/atibrook/sdk/include/brook/CPU/brt.hpp:51,
      from /usr/local/atibrook/sdk/include/brook/brook.h:54,
      from a5br.cpp:23:
      /usr/local/atibrook/sdk/include/brook/CPU/brtvector.hpp:322: error: explicit template specialization cannot have a storage class

      repeated multiple times.

      http://gcc.gnu.org/gcc-4.3/porting_to.html explains:

      Explicit template specialization cannot have a storage class

      Specializations of templates cannot explicitly specify a storage class, and have the same storage as the primary template. This is a change from previous behavior, based on the feedback and commentary as part of the ISO C++ Core Defect Report 605.

       

      Simply removing static as shown in the attached patch works great for me:



      --- brtvector.hpp 2009-10-24 11:22:10.000000000 +0200 +++ brtvector.hpp~ 2009-10-24 11:21:50.000000000 +0200 @@ -317,7 +317,7 @@ template <class T> static typename GetValueOf<T>::type GetAt (const T& in,int i) { return in.getAt(i); } -#define SPECIALGETAT(TYP) template <> TYP GetAt (const TYP& in,int UNUSED(i)) {return in;} +#define SPECIALGETAT(TYP) template <> static TYP GetAt (const TYP& in,int UNUSED(i)) {return in;} SPECIALGETAT(int) SPECIALGETAT(unsigned int)