I would like to use default parameters in nested templates but MS VC++
7.1 chokes on it. Does anyone know how to fix the simple example
below or if indeed it is possible?
template <int N=7>
class A
{
};
template < template <int N=7> class T >
class B
{
A<> a_default; // A works fine using 7 as the default value
T<5> t_5; // T works fine using 5 explicitly
T<> t_default; // error C2976: 'T' : too few template arguments
// why is the default value 7 not getting used here ?
};
int main(int, char**)
{
B< A > b;
return 0;
}
Thanks in advance!
Michael
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]