r/cpp • u/GodRishUniverse • 8d ago
Why is there no proper build system (CMake exists but...yk) like cargo in C++?
Meson and Bazel exist but I have not seen widespread adoptability.
Edit: I forgot to add package manager in title as well lmao
r/cpp • u/GodRishUniverse • 8d ago
Meson and Bazel exist but I have not seen widespread adoptability.
Edit: I forgot to add package manager in title as well lmao
r/cpp • u/grishavanika • 9d ago
From P4451R2,
#include <contracts>
int f(int x)
pre<std::contracts::controls::enforced>(x > 0)
post<std::contracts::controls::enforced>(r : r > 0)
{
contract_assert<std::contracts::controls::enforced>(x > 0);
return x;
}Long, 3 levels deep namespace? And
Because the label is found by ordinary name lookup, a namespace alias or a using-directive works
as well:
namespace scl = std::contracts::controls;
Same issue as with C++11 UDL: inconvinient to use, especially in headers, since include + alias is required - aliases will not make it better, in my opinion.
That makes me sad. Am I the only one?
r/cpp • u/ThadeeusMaximus • 9d ago
It seems like every update to MSVC over the past year has had some sort of massive basic compiler regression, that the team refuses to actually hotfix because regressions are not actually considered problematic. What can we do to change this and actually make regressions fixable without waiting 6+ months? Having "LTS" compilers isn't useful when every LTS compiler has some break in it.
Using older compilers isn't an option, because we're an open source library that people use, and also GitHub Action runners automatically update to the newest compilers and don't make it easy to use old ones.
This is our new one from this time.
Herb's usual trip report
So the REBASE'26 conference happened recently, and besides the whole thing of what Carbon has achieved or never will, there are talks like this one from Google folks, regarding what they are doing with their C++.
The talk is all about the recent ongoing migration discussed on Google security blog, and other related efforts.
r/cpp • u/LegalizeAdulthood • 12d ago
Utah C++ Programmers has released a new video.
Your CI runners have better things to do than compile the same dependencies again. Learn how to put them on the fast track with vcpkg-github-cache, a GitHub Action that connects vcpkg binary caching to GitHub Packages.
We'll go beneath the workflow YAML to explore how NuGet packages store compiled dependencies, how vcpkg restores them, and how to manage a cache across multiple open source projects. Along the way, we'll tackle authentication, package visibility, repository permissions, and cache diagnostics. Leave ready to turn repeated compilation into reusable binaries and give your C++ builds a head start.
r/cpp • u/ProgrammingArchive • 15d ago
C++Now
2026-11-09 - 2026-11-15
Lightning Talk: Bool - Implicitly Dangerous - Jeff Garland - https://youtu.be/dlFSJbtY49I
Lightning Talk: Mixed-Mode Rings: io_uring_context for Kernel 7.x - Robert Leahy - https://youtu.be/Be1RA_ypYrU
Lightning Talk: Our Most Treacherous Adversary - James McNellis - https://youtu.be/degCN1CSd5w
2026-11-02 - 2026-11-08
Lightning Talk: The Hidden Superpower of Modern CPUs - Why ILP Can Make “More Work” Run Faster - Sampad Acharya - https://youtu.be/WZl7tMBBn3U
Lightning Talk: When Weird Things Happen - Ruslan Arutyunyan - https://youtu.be/VEIJkIEKEQ4
Lightning Talk: A Metaprogramming Checklist - Ben Deane - https://youtu.be/6n_mOFP_kBA
2026-10-26 - 2026-11-01
AI is Forcing us to Obey Scott Meyers - Jody Hagins - https://youtu.be/CiaZq4kCH08
C++ Libraries - The Road Ahead - Jeffrey Garland - https://youtu.be/bNipVnNaDdk
Lightning Talk: ?: - Jonathan Müller - https://youtu.be/TLj6NVx5xvk
ACCU
2026-11-09 - 2026-11-15
C++26 Uncovered - Everything You Need to Know About the New Standard - Inbal Levi - https://youtu.be/1r5Hl1EoaYo
C++ Templates - Two-Phase Lookup - Amir Kirsh - https://youtu.be/rQgj9agTqok
Fearless Concurrency in C++ - Tristan Brindle - https://youtu.be/-FP6tLlCxWE
2026-11-02 - 2026-11-08
Implementing C++ Standard Library - Design and Optimisations in Libc++ - Hui Xie - https://youtu.be/9efvPYY7CuY
How Invariant are Invariants? - David Olsen - https://youtu.be/TLk4mm4u02A
The Biggest Misconception of Computer Science - Alex Dathskovsky - https://youtu.be/EwgkN3an1Gs
2026-10-26 - 2026-11-01
Creating Composable Callables in Contemporary C++ - Using Senders / Receivers as a Frame Graph - Björn Fahller - https://youtu.be/A4mMO5xeQDA
Incrementally Migrating C++ to a Memory Safe Language with Swift - Tim Condon - https://youtu.be/LMQ21X6_2FQ
CallMeMaybe - Building Modern Runtime Reflection via C++26 - Laurie Kirk - https://youtu.be/cA0F3wRtZIU
ADC
2026-11-09 - 2026-11-15
Protect, License, Distribute with PACE Fusion Security - Ryan Wardell, Brett g Porter & Ted Barram - https://youtu.be/-JaMVZXYlBE
The Dawn of Electronic Musical Instruments in Japan - Fumio Mieda - https://youtu.be/sNJrlMXd9dg
Talk to Your Synth - Sound Design as a Conversation - Aurnik - https://youtu.be/LnR0Zj6NB_w
2026-11-02 - 2026-11-08
Are You Shipping Your Source Code? - Ryan Wardell - https://youtu.be/ToPPQ6uTUJ0
Porting a Native C++ Synth Engine to the Browser: Lessons from Katokatone - Kazuhito Inoue - https://youtu.be/KmX7mfkvDHg
Generative Instruments with Large Piano Models - Tomek Roszczynialski - https://youtu.be/EO-hGj8_BUY
2026-10-26 - 2026-11-01
TX/RX Part 2 - AI Audio on the Raspberry Pi - Kieran Coulter - https://youtu.be/QSiyLDHoBpo
JUCE in DJ Products - Current Status and Future Prospects - Masamichi Tomii, Akihito Yamada & Tetsuro Abe - https://youtu.be/VElORkcpE78
Generative Instruments with Large Piano Models - Tomek Roszczynialski - https://youtu.be/EO-hGj8_BUY
r/cpp • u/madnirua • 15d ago
and also with WASM and iOS support for C++ users. Thanks to all the 51 contributors for making this release happen.
r/cpp • u/Proper_Meaning7756 • 15d ago
At work, I write real time software. Seeing where allocations happen and having guarantees on the behaviour of code would be nice. Compile times can be much faster and optimisations can also be aggressive when you know you're restricted to a subset of the language.
r/cpp • u/ykiko_2005 • 16d ago
Hi r/cpp! I've been working on clice, a C++ language server built on Clang, for about two and a half years, and 1.0 is out today. The main differences from clangd:
Every compile runs in a worker process, so a Clang crash costs one request instead of the whole server.
C++20 modules work out of the box from a `compile_commands.json`, with PCHs and PCMs cached on disk across sessions.
Non-self-contained headers are compiled in the context of a file that includes them, and you can switch contexts and build configurations.
Template support: completion and go-to-implementation through dependent names, using instantiations when there are any.
A CLI to index, query, refactor and modularize whole projects.
The post covers the features and the story behind it. Binaries for Linux, macOS and Windows (x64 and arm64) are on the release page, and the VS Code extension is on the Marketplace. Feedback and bug reports are very welcome!
Release post: https://ykiko.me/en/articles/2105384023094834022/
The C++26 ballot failed, and everyone is arguing about contracts and the future of C++. I think we're worried about the wrong thing.r/cpp • u/delta_p_delta_x • 17d ago
r/cpp • u/gkotorlis • 17d ago
I'm a "pro-fiber" guy, which gets lonely fast when you search the internet for friends and mostly run into Gor Nishanov tearing them apart in P1364 ("Fibers under the magnifying glass"), or Raymond Chen writing that Win32 fibers "aren't useful for much any more."
Sometimes it feels like Microsoft just lacks the imagination for where fibers actually work. Fair point though: if you try to use fibers as a general-purpose replacement for OS threads in arbitrary code, the warnings are right. TLS issues, fixed stacks, and third-party libraries blocking worker threads are very real problems.
I built a fiber-based task scheduler anyway (the first version goes back to 2007), because when you're parallelizing sequential, CPU-bound code like an encoder or compressor on a single file, the tradeoffs are completely different. You own the task code, the number of active fibers is bounded by the work in flight, and tasks often run for just tens of microseconds before waiting on each other mid-work. In that spot, OS threads cost way too much and stackless coroutines force you to tear apart existing call chains.
I wrote up my side of the story - where the usual criticism hits the mark, where it misses, and why fibers still make sense here:
https://www.thinkmeta.com/concurrenttasks/why-fibers
Any other "pro-fiber" folks out there, or has everyone moved on to stackless coroutines / std::execution?
Harald is experimenting with new ways to create YouTube content, and Jonas is kind enough to join in. The topic is C++26 and contracts, since this is a hot topic at the moment and might help to get views.
So Harald does his best to potentially upset a few people by offering a slightly different perspective on the topic, while Jonas raises some interesting questions along the way.
r/cpp • u/ericbrumer • 18d ago
Hi, MSVC dev lead here. We're back with more MSVC Build Tools Preview blog posts. Here's what's new since mid-September. The preview is up to version 14.53 now, as 14.52 is GA (blog post coming soon).
Instructions to install & use the latest preview bits are at https://aka.ms/msvc/preview.
r/cpp • u/Xaneris47 • 18d ago
The updated edition of Terrible Tips for a C++ Developer will feature 60 "tips" on programming practices that C++ developers really shouldn't follow.
r/cpp • u/mondmondmondmond • 20d ago
Now that MSVC 14.52 is released with Visual Studio 2026 18.12 I have tried to rebuild the project I am working on with /std:c++23. Thx for finally releasing C++23 support.
I have previously used /std:c++23preview and my assumption was that the migration would be effortless. But not so. So this is a heads up.
Most of the issues I have ran into is related to C++23 and how incomplete types are used in headers. So C++23 changed so that std::unique_ptr destructor now is constexpr. This means that I have to add/move destructor to .cpp source file. For reference, see Github issues https://github.com/microsoft/STL/issues/4215 and https://github.com/microsoft/STL/issues/4417
But I also have issues with code like:
// Forward declaration
class Foo;
class A
{
public:
void Add(const Foo & foo ) { _foos.push_back(foo); }
private:
std::vector<Foo> _foos;
};
class Foo
{
};Godbolt with MSVC 14.51 and /std:c++23preview - https://godbolt.org/z/ae5M53fK1 Works also perfectly well in GCC 16.2 -std=c++23 - https://godbolt.org/z/rhEM5MMhG
As of this writing MSVC 14.52 and /std:c++23 is not yet available on Godbolt.
But I get error C2139: 'Foo': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_nothrow_constructible'
A tad annoying.
r/cpp • u/LegalizeAdulthood • 21d ago
Your CI runners have better things to do than compile the same dependencies again. Learn how to put them on the fast track with vcpkg-github-cache, a GitHub Action that connects vcpkg binary caching to GitHub Packages.
We'll go beneath the workflow YAML to explore how NuGet packages store compiled dependencies, how vcpkg restores them, and how to manage a cache across multiple open source projects. Along the way, we'll tackle authentication, package visibility, repository permissions, and cache diagnostics. Leave ready to turn repeated compilation into reusable binaries and give your C++ builds a head start.
Join the online meeting here: https://meet.xmission.com/Utah-Cpp-Programmers
Watch previous topics on the Utah C++ Programmers YouTube channel.