[clang] [clang]: implement std::meta::is_type (PR #211653)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 16 10:56:18 PDT 2026
================
@@ -0,0 +1,35 @@
+/*===---- meta - header for reflection metafunctions -----------------------===
----------------
AaronBallman wrote:
We did. The background here (as I recall it) is:
* libstdc++ has a `<meta>` header that only has declarations within it. The compiler is responsible for recognizing these meta functions and providing the actual implementation semantics.
* We had an allergic reaction to that design because we try hard not to recognize random STL interfaces from the compiler, we asked if they'd be willing to use builtins instead.
* They had an allergic reaction to adding a half a billion builtins and trivial function definitions when they can just recognize the library calls directly.
* So we decided that the only viable solution we have is for Clang to vend `<meta>`, otherwise there's no way for `-stdlib=libstdc++` to work in Clang because we couldn't consume their header. By vending it with Clang, our `<meta>` should be found first on the search path and work for any STL implementation.
https://github.com/llvm/llvm-project/pull/211653
More information about the cfe-commits
mailing list