According to standard ( N3797 ) ยง8.3.6 / 6 Default Arguments [dcl.fct.default] (emphasis mine)
With the exception of member functions of class templates, the default arguments in the definition of a member function that appear outside the class definition are added to the set of default arguments provided by the member Function declaration in the class definition. The default arguments for the member function of the class template must be specified in the initial declaration of the member function in the class template.
The above means that the default arguments for member functions of template classes go only inside the class definition. That way, you either put the declaration of the member function in the default argument:
template<T> class TSquare { ... TSquare (T size_, T x_, T y_, T scale_ = 0); ... };
Or you should put the entire definition of a member function inside the class definition.
template<T> class TSquare { ... TSquare (T size_, T x_, T y_, T scale_ = 0) { ... } ... };
source share