Package: tapiir Severity: normal Tags: patch When building 'tapiir' on amd64 with gcc-4.0, I get the following error:
MTD.hxx:202: error: invalid function declaration MTD.hxx:204: error: explicit specialization of 'void MTD<int, short int>::Clip(int&) const' must be introduced by 'template <>' MTD.hxx:204: error: template-id 'Clip<>' for 'void MTD<int, short int>::Clip(int&) const' does not match any template declaration MTD.hxx:204: error: invalid function declaration MTD.hxx:206: error: explicit specialization of 'void MTD<float, float>::Clip(float&) const' must be introduced by 'template <>' MTD.hxx:206: error: template-id 'Clip<>' for 'void MTD<float, float>::Clip(float&) const' does not match any template declaration MTD.hxx:206: error: invalid function declaration MTD.hxx:210: error: explicit specialization of 'void MTD<int, float>::MulAdj(int&) const' must be introduced by 'template <>' MTD.hxx:210: error: template-id 'MulAdj<>' for 'void MTD<int, float>::MulAdj(int&) const' does not match any template declaration MTD.hxx:210: error: invalid function declaration MTD.hxx:211: error: explicit specialization of 'void MTD<int, short int>::MulAdj(int&) const' must be introduced by 'template <>' MTD.hxx:211: error: template-id 'MulAdj<>' for 'void MTD<int, short int>::MulAdj(int&) const' does not match any template declaration MTD.hxx:211: error: invalid function declaration make[3]: *** [FileIO.o] Error 1 make[3]: Leaving directory `/tapiir-0.7.1/src' With the attached patch 'tapiir' can be compiled on amd64 using gcc-4.0. Regards Andreas Jochens diff -urN ../tmp-orig/tapiir-0.7.1/src/MTD.hxx ./src/MTD.hxx --- ../tmp-orig/tapiir-0.7.1/src/MTD.hxx 2005-03-03 20:36:34.475082847 +0100 +++ ./src/MTD.hxx 2005-03-03 20:36:28.745188822 +0100 @@ -193,22 +193,22 @@ /****************************** specializations ******************************/ -inline float MTD<int,short>::FromGain(const int& g) const { return float(g)/256.; } -inline float MTD<int,float>::FromGain(const int& g) const { return float(g)/256.; } +template <> inline float MTD<int,short>::FromGain(const int& g) const { return float(g)/256.; } +template <> inline float MTD<int,float>::FromGain(const int& g) const { return float(g)/256.; } -inline int MTD<int,short>::ToGain(const float& f) const { return (int)(f*256.); } -inline int MTD<int,float>::ToGain(const float& f) const { return (int)(f*256.); } +template <> inline int MTD<int,short>::ToGain(const float& f) const { return (int)(f*256.); } +template <> inline int MTD<int,float>::ToGain(const float& f) const { return (int)(f*256.); } -inline void MTD<float,short>::Clip( float& f) const +template <> inline void MTD<float,short>::Clip( float& f) const { if (f>32767.) f = 32767.; else if (f<-32767.) f = -32767.; } -inline void MTD<int ,short>::Clip( int& i) const +template <> inline void MTD<int ,short>::Clip( int& i) const { if (i>32767) i = 32767; else if (i<-32767) i = -32767; } -inline void MTD<float,float>::Clip( float& f) const +template <> inline void MTD<float,float>::Clip( float& f) const { if (f>1.) f = 1.; else if (f<-1.) f = -1.; } -inline void MTD<int,float>::MulAdj( int& i) const { i>>=8; } -inline void MTD<int,short>::MulAdj( int& i) const { i>>=8; } +template <> inline void MTD<int,float>::MulAdj( int& i) const { i>>=8; } +template <> inline void MTD<int,short>::MulAdj( int& i) const { i>>=8; } /*****************************************************************************/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]