Sol2: Visual Studio 17 (v15.5.2) - C++17 deprecation

Created on 19 Dec 2017  路  2Comments  路  Source: ThePhD/sol2

warning STL4017: std::wbuffer_convert, std::wstring_convert, and the header (containing std::codecvt_mode, std::codecvt_utf8, std::codecvt_utf16, and std::codecvt_utf8_utf16) are deprecated in C++17. (The std::codecvt class template is NOT deprecated.) The C++ Standard doesn鈥檛 provide equivalent non-deprecated functionality; consider using MultiByteToWideChar() and WideCharToMultiByte() from instead. You can define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning.#

VS 2017 ~15.5. removes deprecated C++17 features, which makes compiling sol v2.18.7 impossible (without specifying _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING)

The standard states the following:

this library component should be retired to Annex D, along side , until a suitable replacement is standardized.

So I guess we should ignore this untile the standard comes up with a replacement...right?

Note: I compile on Warning level 3 and it's treated as an error (C4996)

Bug.Well Shit Compilation.Bwuh Feature.Already Done Help.Desk

Most helpful comment

Looks like this now, just have to push it:

Waow

All 2 comments

http://sol2.readthedocs.io/en/latest/codecvt.html

I am going to add some extra information to that docs page, but right now I'm busy with CMAke.

The short answer is, it's totally fine. Define the macro.

Looks like this now, just have to push it:

Waow

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrgreywater picture mrgreywater  路  4Comments

squeek502 picture squeek502  路  4Comments

morsisko picture morsisko  路  3Comments

spin-scenario picture spin-scenario  路  8Comments

patlecat picture patlecat  路  7Comments