[clang] [libcxx] [lldb] [clang]: implement std::meta::is_type (PR #211653)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 24 04:11:40 PDT 2026


AaronBallman wrote:

> > `__cpp_impl_reflection` is only enabled when `-freflection` is on
> 
> Why? Can we avoid `-freflection` and just enable reflection since C++26? Or can we make `-freflection` meaningless since C++26 and allow it in old modes as an extension (which is not very conforming, though)?

This is something we've discussed in the reflection sync-up meetings. Reflection will likely never be extended to older language modes (and certainly never to C) given it's design issues; it drags in too much baggage around handling of constant expressions, can break existing code due to syntactic ambiguities, etc. It's not off the table for older C++ modes, but is not something we should consider until after the implementation is rock solid and we have a lot of deployment experience. (IMO, extension work should be dedicated towards supporting reflection over Clang's extensions before working towards exposing in older language modes.)

Given the experimental nature of the feature and the fact that we already know C++29 will make significant changes to it, we want it kept behind a flag for now. The goal is to eventually get to the point of not needing the flag so that `-std=c++26` suffices (at least for the non-generative parts of reflection), but we want to be conservative given the feature.

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


More information about the cfe-commits mailing list