8

According to this article and P0618R0, the header <codecvt> has been deprecated in C++17.

I have been used it heavily. So I want to know:

What's the substitution of <codecvt> in C++17 or later?

xmllmx
  • 39,765
  • 26
  • 162
  • 323
  • 3
    currently? non. encoding has always being a sore problem in C++ – David Haim Mar 28 '17 at 10:08
  • 6
    Guess that will be *"or later"*. Deprecated generally means "avoid using this as it is not good, and might get replaced later". On the other hand, we have `strstream` which was deprecated already in C++98, and is still there in C++17. – Bo Persson Mar 28 '17 at 10:11
  • Don't panic. Formally, deprecation **only** means that the deprecated feature **might** be removed sometime in the future. In itself that's not a reason to stop using the feature. For example, the standard C libraries have been deprecated in C++ for more than 20 years, but they're not going away. – Pete Becker Mar 28 '17 at 11:41
  • 1
    @PeteBecker Well, there is even [a recent proposal](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0619r0.html#3.5) to undeprecate the C headers (and remove useless C++ wrappers like ``). The reason being the same a for the undeprecation of `static` functions: even if C++ has better alternatives, C compatibility matters and compatibility features shouldn't be deprecated. – Morwenn Mar 28 '17 at 12:00
  • I read this question as 'what is the proposal emerging from the committee' nowadays? Meening, which external lib is the best candidate for replacement? – Sandburg Aug 21 '18 at 15:22

0 Answers0