Is there a replacement for wstring_convert in a recent standard?

Viewed 459

In my current code (which is based on C++11) I use the following:

class Foo
{
public:
    void Test(); 
private:
    std::wstring_convert<std::codecvt_utf8<wchar_t> > m_myconv
};

void Foo::Test()
{
    std::wstring temp = m_myconv.from_bytes( (const char *) charArray );
}

I'm converting the results of the SQLite library to the std::wstring.

I understand that with C++17, such conversion is deprecated and I will no longer be able to use this code.

Is there an alternative that I can use for all 3 major platforms: Windows, *nix and Mac?

I understand that there is a possibility of using Boost. But this is a last resort, i.e. if there is no solution with the standard library.

0 Answers
Related