Strange wstring to string behavior c++11
<p>As I understand c++11 allow easy to use conversion between string and wstring through wstring_convert, and it should be as easy as(incudes are omitted):</p>

<pre><code>int main() {
    std::wstring_convert&lt; std::codecvt_utf8&lt;wchar_t&gt; &gt; converter;
    std::string gg = u8"prova";
    std::wcout &lt;&lt; converter.from_bytes(gg.data()) &lt;&lt; std::endl;
}
</code></pre>

<p>The output is a null string.</p>

<p>I also tried std::codecvt_utf8_utf16 with no luck.</p>

<p>I looked up in stackoverflow and tried many suggestion such as <a href="https://stackoverflow.com/questions/2573834/c-convert-string-or-char-to-wstring-or-wchar-t">C++ Convert string (or char*) to wstring (or wchar_t*)</a> but nothing appens.</p>

<p>Can anyone help me here?</p>

<p>I'm on windows and I'm using gcc (g++) v 5.3.0 through mingw and msys2.</p>

<p>EDIT: Compiling the same code with Microsoft Visual Studio 2013 results in a working solution.</p>