Also, this line is problematic :
void std::basic_string<>::_Rep::_M_clone(allocator *param_1,uint param_2)
according to the declaration, this is a void function that is a member of the
std::basic_string
class with an unspecified template type argument. Both of those incorrect. The class
basic_string
is part of the Standard Template Library (STL) and it is highly unlikely you are not actually adding a method to that class. It is more likely that you are returning that type and almost always, one uses the
std::string
type in user code. Within the function itself, you are calling another function of the same name. Either that is a base class method or it is just wrong. There are a few ways one can invoke the base class method of the same name. The one I prefer is to use the
__super
keyword.
If I make all of those assumptions, the code should look more like this :
std::string _Rep::_M_clone( allocator *param_1, uint param_2 )
{
return __super::_M_clone( param_1, param_2 );
}
Note: I avoid use the "using namespace xyz" whenever I can, which is almost always, and I never, ever use it in a header file. This is because a "using namespace" statement can not be undone and it is bad practice to force it on all consumers of a header file.