J
JohnPantango
Can anyone give me a simple work around to fix this compiler error on VC7.1
.....cpp(23) : error C2912: explicit specialization; 'bool Equal<_F32>(const
_F32::type,const _F32::type)' is not a specialization of a function template
For this code:
template< class T >
inline bool Equal( const typename T::type v0,
const typename T::type v1 )
{
return v0 == v1;
}
template<>
inline bool Equal< _F32 >( const _F32::type v0, // error occurs at this line
const _F32::type v1 )
{
return fabs( v0 - v1 ) < _F32::epsilon;
}
EnderJSC
.....cpp(23) : error C2912: explicit specialization; 'bool Equal<_F32>(const
_F32::type,const _F32::type)' is not a specialization of a function template
For this code:
template< class T >
inline bool Equal( const typename T::type v0,
const typename T::type v1 )
{
return v0 == v1;
}
template<>
inline bool Equal< _F32 >( const _F32::type v0, // error occurs at this line
const _F32::type v1 )
{
return fabs( v0 - v1 ) < _F32::epsilon;
}
EnderJSC