3 ms·
> Second, conforming compiler and standard library implementations are coming quickly. Throughout the development of C++26, at any given point both GCC and Clan
by dataflow 6mo ago
> Second, conforming compiler and standard library implementations are coming quickly. Throughout the development of C++26, at any given point both GCC and Clang had already implemented two-thirds of C++26 features. Today, GCC already has reflection and contracts merged in trunk, awaiting release.
How far is Clang on reflection and contracts?
- cpeterso 6mo agoClang’s C++2c implementation status page simply says “no” for both reflection and contracts. GCC’s says “yes”. https://clang.llvm.org/cxx_status.html https://clang.llvm.org/cxx_status.html https://gcc.gnu.org/projects/cxx-status.html https://gcc.gnu.org/projects/cxx-status.html
- dataflow 6mo agoThat much I'm aware, but that's just about feature availability. I was wondering how far the implementations have progressed internally, despite the features being unavailable.
- tbaeder 6mo agoClang basically doesn't implement anything regarding reflection right now. There is some support for parsing (https://github.com/llvm/llvm-project/blob/main/clang/test/Parser/parsing-reflection.cpp https://github.com/llvm/llvm-project/blob/main/clang/test/Pa...) but that's it. There are some open PRs for other parts though.
- dataflow 6mo agoThanks, yeah, I was worried that might be the case. Given how complicated these features sound, it makes me wonder if they're gonna finish before the decade is over...
- Asmod4n 6mo agoBloomberg has a clang implementation of reflection: https://github.com/bloomberg/clang-p2996 https://github.com/bloomberg/clang-p2996 It has been on compiler explorer for a while This has been used to add reflection to simdjson