icecream-cpp icon indicating copy to clipboard operation
icecream-cpp copied to clipboard

Functionalities in <codecvt> are deprecated since C++ 17/20

Open LyricZhao opened this issue 2 years ago • 1 comments

Some functionalities in <codecvt> (e.g. std::codecvt<char16_t, char, std::mbstate_t>) are being deprecated since C++ 17/20. Please refer to https://en.cppreference.com/w/cpp/locale/codecvt for more details. Compiling with these usages may throw annoying warnings.

LyricZhao avatar May 16 '22 03:05 LyricZhao

An easy way to ignore that is to add diagnostic pragmas around the entire implement:

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

...

#pragma GCC diagnostic pop

Since Clang could recognize GCC, we just put GCC here in the pragmas.

LyricZhao avatar May 16 '22 03:05 LyricZhao