H
huili80
For example, like in the following, the part commented out was
intended as partial spectialzation, but it would even compile. Is it
even legal to partially specialize a nested template class inside
another template class?
template < typename T >
struct A
{
template < typename U >
struct B
{
static const int v = 1;
};
/* template < > // this doesn't compile
struct B < int >
{
static const int v = 3;
};
*/
};
intended as partial spectialzation, but it would even compile. Is it
even legal to partially specialize a nested template class inside
another template class?
template < typename T >
struct A
{
template < typename U >
struct B
{
static const int v = 1;
};
/* template < > // this doesn't compile
struct B < int >
{
static const int v = 3;
};
*/
};