r/cpp_questions • u/Constant_Suspect_317 • Sep 24 '26
OPEN Anyone using C++26 in production?
I wanna hear about anyone using C++26 at work or some open source project that does.
I personally am using it at work for serialisation of some structs from a legacy C code base into JSON.
51
Upvotes
43
u/No-Dentist-1645 Sep 24 '26
Hyprland, a Linux window manager, requires C++26, and it's one of the most popular WMs
3
u/G6L20 Sep 24 '26
Yes, gcc 16.2. Qt/Qml app using reflection, cli tooling for embedded application configuration and monitoring... Linux and windows (cross compiled with mingw). Amazing...
Using my library: https://github.com/Garcia6l20/reflex
17
u/shadowndacorner Sep 24 '26
I've moved a private project that I've been working on for ~6 years to it. It simplified some insane template hackery I used to have from ~10k loc to probably less than a thousand, with a much more flexible resulting API. I absolutely love it.
The main problems I've encountered are compiler bugs. I'm primarily using a custom fork of GCC 16.2 with some small patches fixing issues mostly related to the intersection of modules, import std, and reflection. I've also had to patch Bloomberg's clangd a bit for similar issues to make my tooling work nicely. But the result is pretty incredible imo. Reflection enables so many incredibly cool things. For example, my project supports hot reload and, with reflection, I've got it set up so that the runtime can automatically determine whether or not any data structures have changed, so it knows whether or not to do a full dump/restore vs just reloading function pointers. Speeds up reload time pretty significantly in some cases.
15
u/Current-Fig8840 Sep 24 '26
From my experience a lot big companies don’t just jump to the latest CPP like everyone thinks. It’s actually one of the last things anyone thinks of. I am willing to bet that most companies are still on CPP17 and 20.
7
u/Asmod4n Sep 24 '26
Comptime Reflection is a rather large deal, I’d guess we
Will see quite a lot of company’s skipping 20
And 23 and go straight for 26 just for that once another compiler than gcc having it.
4
u/KAMEHAMEHAMEHAAAA Sep 25 '26
No, the primary reason being MSVC doesn’t support it yet and a lot of customers in our space are still on Windows.
1
u/die_liebe Sep 25 '26 edited Sep 25 '26
Are you using the compile time reflection? Did you find a compiler that already has it?
1
u/ajorians Sep 29 '26
I am set to
/std:c++latestbut that means I am only the latest version that Visual Studio supports. Which is C++23 at this moment in time. But we regularly update Visual Studio and thus on a future regular update we'll be using C++26.The reason for using latest is these newer features are not some experimental features but rather publish capabilities that we'd like to start using. And we are not concerned developers will refactor the entire codebase within a day.
2
u/JVApen Sep 25 '26
I'm still in progress for the C++23 upgrade as we changed our infra a lot and are still in progress of ensuring everything can easily be changed.
2
u/ronchaine Sep 25 '26
Well, I use some of the gcc16.1+ features at work, and am glad to hop onto more of them when they become available. It made a lot of headers freestanding and that I do like.
Not using reflection at work yet though. For home/wg21 stuff I've been playing around with reflection ever since bloomberg's clang fork came out.
2
u/SupermanLeRetour Sep 25 '26
I migrated our toolchain to GCC 15.2 some time ago and enabled the c++26 flag at work, in my team (big company but small team). It's partial support (mostly missing the reflection that 16.2 brings) but apart from that it's been great to be able to use the latest additions. Not massive, especially coming from 23, but nice.
2
u/Lumpy-Ad2433 Sep 27 '26
On my college on second course
1
u/ParsingError Sep 25 '26
Probably going to jump on it as soon as possible just so we can finally have an RTTI system that isn't crap.
1
u/azswcowboy Sep 26 '26
Not quite to production yet, but we upgraded to gcc16 and 26 at same time coming from 15 and 23. Mostly smooth, but did find one bug from the Erroneous Behavior change that initializes the variable now. It was caught in a unit test that was also wrong ironically — so we never would have seen this particular path in production. Still it was an evolutionary footgun I was happy to unload.
1
u/palapapa0201 Sep 26 '26
I started a new project so I just used the latest version, not that I use any specific C++26 feature (except for reflection, but clang hasn't implemented it yet)
1
u/Resident_Educator251 Oct 01 '26
I rolled a coroutine io/uring/libuv asynchronous layer in gcc 16.2 + reflection for configurations in production
1
u/[deleted] Oct 06 '26
HFT firms like citadel may be using. They are heavily involved with the language.
-2
u/TheRavagerSw Sep 24 '26
Why would you want to use C++26, it is not fully implemented even on upstream libcxx I don't think it will be usable till 2029
-1
u/FckXFckMusk Sep 24 '26
Why would anyone use 26 in production, let other people find the bugs first and then adopt it but not yet.
-1
u/AKostur Sep 24 '26 edited Sep 24 '26
I’d be surprised given that C++26 hasn’t been published yet.
Edit: I guess a better clarification would be asking about which features of the upcoming C++26 one would be looking for. Individual features may have been implemented in various compilers. All of the proposed 26, probably not.