If you put this in some context, the third way may be legal, provided that the second default option was specified earlier.
template <class T, class U = double> struct X; template <class T = int, class U> //here struct X {}; int main() { X<> x; X<float> y; X<char, char> z; }
Unclebens
source share