B
BigMan
Why cannot I define a member of an explicitly specialized class
template out of the class template specialization:
template< int i >
struct a
{
static void Do( );
};
template< >
struct a< 2 >
{
static void Do( ); // in-class definition would be OK...
};
// .. however, neither VC 7.1, nor g++ 3.4.2,
// accept out-of-class definition:
template< >
void a< 2 >:o( )
{
}
template out of the class template specialization:
template< int i >
struct a
{
static void Do( );
};
template< >
struct a< 2 >
{
static void Do( ); // in-class definition would be OK...
};
// .. however, neither VC 7.1, nor g++ 3.4.2,
// accept out-of-class definition:
template< >
void a< 2 >:o( )
{
}