Please can anyone tell me what is wrong with my predeclaration of
std::basic_string
?
It has three template parameters:
template<class charT, class traits = char_traits<charT>,
class Allocator = allocator<charT> >
class basic_string;
But there's no reason to declare standard types yourself and, as you've demonstrated, a good reason not to. So don't do that; include the header if you need the declaration.