forward declaration of std::string and std::wstring
问题 The problem of the inability to forward declare std::string and std::wstring is often discussed. As I understand, the reason is that those types are typedefing of instantiation of template class basic_string: namespace std { typedef basic_string<char> string; typedef basic_string<wchar_t> wstring; } And forward declaration of a typedef isn't allowed by the language. Wouldn't it be better for the c++ standard using inheritance instead of typedef: namespace std { class string : public basic