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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 18 11:20:31 PDT 2024


ldionne wrote:

Or we could also use final macros, which I just learned about: https://clang.llvm.org/docs/LanguageExtensions.html#final-macros

```c++
#pragma clang final(_LIBCPP_HAS_EXCEPTIONS)
#if __has_feature(__cxx_exceptions)
#  define _LIBCPP_HAS_EXCEPTIONS 1
#else
#  define _LIBCPP_HAS_EXCEPTIONS 0
#endif
```

IDK if that behaves exactly how we want, but basically we have a few options on the table.

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


More information about the libcxx-commits mailing list