Template struct with the default template argument is not instantiated
问题 Let's say I have this code template<typename T2, typename T = int> struct X { static double f; }; template<typename T> double X<T>::f = 14.0; If I try to compile clang give me the following error nested name specifier 'X::' for declaration does not refer into a class, class template or class template partial specialization and for GCC : error: template definition of non-template 'double X::f' The question is : Why the compiler want us to specialize the struct X like that : template<typename