cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

frankas
Journeyman III

FIX for; brtvector.hpp compile error in gcc 4.3.3

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)

0 Likes
1 Reply
genaganna
Journeyman III

This has been fixed long back.  Take latest code from https://sourceforge.net/projects/brookplus/.

 

0 Likes