These classes are usually declared in millions of places 1 . Only one of these declarations will contain default arguments, because otherwise it is a mistake.
For basic_string , in libstdc ++, the default arguments are in the forward declaration in bits/stringfwd.h (which is included, among other things, in <string> ):
template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_string;
1 Should not be taken literally.
source share