(sorry. might not be the most relevant question...)
According to https://en.cppreference.com/w/cpp/language/string_literal:
""" Wide string literal. The type of a L"..." string literal is const wchar_t[N] """
however, g++ seems to be choosing const wchar_t* in this case :
auto sw = L"foo";
cout << "type : " << typeid(sw).name() << " >" << sw << "<\n";
cout << " type : " << typeid( const wchar_t * ).name() << " | type : " << typeid( const wchar_t [] ).name() << "\n";
which gives the following output on GCC 5.4.0:
type : PKw >0x401470<
type : PKw | type : A_w
Did I get it right ?