[libcxx-commits] [libcxx] [libc++] Inline __has_feature and __has_extension uses (PR #133634)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 9 06:21:16 PDT 2025
philnik777 wrote:
> One downside of this approach is that it makes it harder to support the "extensions" we support.
What exactly did you mean here? I don't understand what you want to express by "support the extensions we support".
> Right now, `__config` gives us a pretty decent list of things (like blocks, objc ARC, asan, etc) that are technically not ISO C++ but that we still do something special in order to support. I do think that list provides some value.
That may provide some value, but a document listing the supported extensions would provide a lot more value. I'm quite certain we support a lot more extensions than the ones listed (which we might not even be aware of) through e.g. compiler builtins.
>
> I'm not sold on this idea -- I could be convinced but ideally I'd like to understand if there are other benefits beyond "why not"?
It's mostly "why not", but FWIW I find it easier to read when inlined than having macros for this stuff.
https://github.com/llvm/llvm-project/pull/133634
More information about the libcxx-commits
mailing list