[libcxx-commits] [libcxx] [libcxxabi] [libc++][RFC] Always define internal feature test macros (PR #89178)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 9 13:08:12 PDT 2024


EricWF wrote:

I agree with most of what @ldionne said. There in benefit to the negative macro formulation that is lost.
That benefit is making it harder to accidentally misuse the macro in a way that hides its misuse.

This can be mitigated by testing, and by tooling. If we're going to go this path, I think we should change the naming scheme to remove `_LIBCPP_HAS`. These sorts of names have a history of being defined/undefined, but never defined to `0`. To avoid confusion, I think switching to a different naming scheme (any different naming system), would be valuable.

I might suggest `_LIBCPP_FEATURE_` ?

https://github.com/llvm/llvm-project/pull/89178


More information about the libcxx-commits mailing list