最佳答案
template<typename T>
class CConstraint
{
public:
CConstraint()
{
}
virtual ~CConstraint()
{
}
template <typename TL>
void Verify(int position, int constraints[])
{
}
template <>
void Verify<int>(int, int[])
{
}
};
Compiling this under g++ gives the following error:
Explicit specialization in non-namespace scope 'class CConstraint'
In VC, it compiles fine. Can anyone please let me know the workaround?