There are many ways. Here are a couple:
std::string str = converter.to_bytes(L"Hello world");
std::wstring wstr = converter.from_bytes("Hello world");
Only works for single byte characters:
std::string str("Hello world!");
std::wstring wstr(str.begin(), str.end());
<codecvt> header became deprecated, like
std::wbuffer_convert template classes, so at moment there is no way to do this in general case without using third-party libraries or outdated functionality.