Does VC++ not support default template parameters arguments? This simple code:
template <typename T=int>
class X
{
};
X x;
gives me an 'error C2955: 'X' : use of class template requires template argument list
'. No complaints about the template declaration, however.
What am I missing here? Some compiler switch maybe?
I think you still have to specify an empty template list, or use a typedef:
template <typename T=int>
class X
{
};
X<> x;
typedef X<> XX;
XX x;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With