Trying to compile some code from StackOverflow, basically, these lines:
std::wifstream wif(filename);
wif.imbue(std::locale(std::locale::empty(), new std::codecvt_utf8<wchar_t>));
GCC version: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0
I get a compile error:
'empty' is not a member of 'std::locale'
And I agree with the compiler, checked with documentation like cppreference - there is no info about such thing. Header files as well do not show anything.
I wonder, if this is just me or the sample code from another topic...
Can it be a MSVC feature? (the sample code I used is from the question related to Windows)