[libcxx-commits] [libcxx] [libc++] Deprecates std::errc constants. (PR #80542)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 5 09:35:55 PDT 2024
mordante wrote:
@gulfemsavrun I like to discuss the way forward before deciding the changes I'm going to make.
I agree with @AaronBallman the behaviour is correct. However I wonder whether we're doing our users a service with the correct behaviour. When C++ removes the POSIX macros from `cerrno` in C++XX they may still be available in `errno.h`. In that case the user no longer gets a deprecation message from libc++ and can keep using them until their C library removes the macros. So some users may be happier when C++ removes them.
I think we should keep the behaviour for the `std::errc` and add a toggle for one release as requested by @nico.
For the macros I wonder what the best way would be:
1. remove the deprecation entirely
2. keep the deprecation, but only in C++26 (so don't retroactively apply this part of the LWG issue). Since there are few user of C++26 I see no strong motivation to add the `std::errc` toggle here.
3. keep the deprecation and use the `std::errc` toggle for one release
Personally I'm leaning towards 2, but I like to hear your opinions.
https://github.com/llvm/llvm-project/pull/80542
More information about the libcxx-commits
mailing list