Why not do it the way the Win32 API does: use wide characters inside and provide a personal converting facade of DoSomethingA functions that simply transform their input into Unicode.
Thus, you can define the type of tstring as follows:
#ifdef _UNICODE typedef std::wstring tstring; #else typedef std::string tstring; #endif
or perhaps:
typedef std::basic_string<TCHAR> tstring;
source share