Name: Anonymous 2011-02-15 19:11
In C++, can I define a typecast operator for converting (both ways) between
In the end, I just want to avoid having to declare every function twice:
std::string and const char *?In the end, I just want to avoid having to declare every function twice:
void func1(const char *x) { func1(std::string(x)); }
void func1(std::string x);
void func2(const char *x) { func2(std::string(x)); }
void func2(std::string x);
void func3(const char *x) { func3(std::string(x)); }
void func3(std::string x);