Overload conversion operator from outside class...
I wan't to convert an std::string to a std::wstring. To make things easier, I want to overload the conversion operator to make it more simplified but I don't want to encapsulate in my own class. Here's sort of how I'd imagine it to be implemented:
...so then I can do something like this:
operator std::wstring( std::string a )
// conversion code here
Obviously, my attempt failed. But is this even possible?
std::string Text( "This is text." );
std::wstring WideText = Text;