On Windows Phone 8.1, this definition is:
typedef std::wstring string_t;
I used this:
string_t toStringT = U("sample"); std::string fromStringT(toStringT.begin(), toStringT.end());
or
std::string fromStringT(conversions::to_utf8string(toStringT));
source share