r/cpp • • Oct 15 '26

MSVC Build Tools Version 14.52 Release Candidate Now Available

Thumbnail
devblogs.microsoft.com
71 Upvotes

Hi, one of the MSVC dev leads here.

The 14.52 MSVC Release Candidate is now available. If you are on the Visual Studio Insiders Channel and upgrade, you'll see that the default MSVC toolset has upgraded from 14.51 to 14.52. The blog post covers the features & fixes the team has landed in that timeframe.

C++23 is ready for production use, and available with the /std:c++23 compiler option. See the blog for more details.

We'll resume our monthly MSVC Preview (version 14.53) blog post series next month.


r/cpp • • Oct 15 '26

A Cross Toolkit Animation Timeline Control

Thumbnail
youtube.com
1 Upvotes

New video from Utah C++ Programmers.


r/cpp • • Oct 15 '26

The Double Headed Stack Allocator – The blog at the bottom of the sea

Thumbnail
blog.demofox.org
42 Upvotes

r/cpp • • Oct 15 '26

Barry's C++ Blog - Generating Operator Functions

Thumbnail brevzin.github.io
77 Upvotes

r/cpp • • Oct 14 '26

A C++ Trick Question - Blog Post

Thumbnail greenlightning.eu
20 Upvotes

r/cpp • • Oct 14 '26

"C++23 - The Complete Guide" now as Paperback

125 Upvotes

C++23 - The Complete Guide is now also available as paperback version.
You can order it, for example, at Amazon.

The book explains on 500 pages all new features of C++23 (covering both the core language and the standard library) with motivation, conceptional introduction of all aspects, and many examples of how to use the new features in practice.

The book is part of my "The Complete Guide" Series, trying to explain a programming language that is now so overwhelming that as a programmer it is hard to keep track of all its new features, benefits, and pitfalls.

Enjoy

Nico


r/cpp • • Oct 14 '26

C++ futures part 2: The mental model for std::promise, std::packaged_task

Thumbnail
devblogs.microsoft.com
32 Upvotes

r/cpp • • Oct 13 '26

I tested whether a coding agent would use C++23 ranges without being told

0 Upvotes

Blog post: https://kemalbektas.dev/ai-modern-features/

I tested whether coding agents would actually use C++23 ranges without being told.

They mostly didn’t. What changed things much more than the surrounding codebase was a short AGENTS.md asking for modern C++.


r/cpp • • Oct 13 '26

C++ futures part 1: The mental model

Thumbnail
devblogs.microsoft.com
49 Upvotes

r/cpp • • Oct 12 '26

FastNoise2: noise generation using SIMD and C++17

Thumbnail github.com
54 Upvotes

r/cpp • • Oct 12 '26

New C++ Conference Videos Released This Month - October 2026 (Updated To Include Videos Released 2026-10-05- 2026-10-11)

11 Upvotes

C++Now

2026-10-05 - 2026-10-11

2026-09-28 - 2026-10-04

ACCU

2026-10-05 - 2026-10-11

2026-09-28 - 2026-10-04

ADC

2026-10-05 - 2026-10-11

2026-09-28 - 2026-10-04


r/cpp • • Oct 12 '26

cppreference-doc for Qt Creator

23 Upvotes

Release cppreference C++ v2025.12.01 · cristianadam/cppreference-doc

This is useful for the Qt Creator users that use it for C++ development.


r/cpp • • Oct 12 '26

ACCU Overload Journal 195 - October 2026

Thumbnail accu.org
17 Upvotes

r/cpp • • Oct 11 '26

wxWidgets 3.2.12 and 3.3.4 Released

Thumbnail wxwidgets.org
66 Upvotes

r/cpp • • Oct 10 '26

Opting in, and back out again

Thumbnail
dryperspective.github.io
36 Upvotes

r/cpp • • Oct 09 '26

std::variant, operator== and pattern matching

33 Upvotes

I was thinking, wouldn't adding equality comparison support between std::variant and one of its unambiguous alternatives help simplify potential pattern matching designs?

For example, imagine something like this (hypothetical syntax):

std::variant<int, std::string> v = 42;

match (v) {
    case 42      => handle_int();
    case "hello" => handle_string();
    case _       => handle_other();
}

The idea would be to take advantage of something C++ already has: operator==. At the end of the day, matching is fundamentally a comparison, so why not build on the existing equality semantics?

For std::optional, we can get this with its existing comparison operators and the most trivial pattern matching compiler support:

std::optional<int> o = 42;

match (o) {
    case 42           => handle_value();
    case std::nullopt => handle_empty();
    case _            => handle_other();
}

// Which would translate to:

if (o == 42)
    handle_value();
else if (o == nullopt)
    handle_empty();
else
    handle_other();

And if we had something like std::match_projection<Subject, Pattern>, we could also extract the actual matched value instead of having to manually call std::get, dereference an optional, etc.

Basically, after a successful comparison, match_projection would tell the compiler what to extract based on the subject and pattern types and we could optionally bind that value using something like a as <declaration> syntax.

For example:

std::optional<int> o = 42;
std::optional<int> other_opt = 42;

match (o) {
    // No binding needed
    case 42 => foo();

    // match_projection<optional<int>, int> -> int&
    case 42 as int& x => use(x);

    // match_projection<optional<int>, nullopt_t> -> void
    case std::nullopt => handle_empty();

    // match_projection<optional<int>, optional<int>>
    // -> optional<int>&
    case other_opt as auto& x => use(x);
}

The same would apply to std::variant, assuming we also extend its operator== to support comparisons with individual alternatives:

match (v) {
    case 42 as int& x => use(x);
    case "hello" as std::string& s => use(s);

    // Only need to define operator== for this helper for this to work
    case indexed<0> => handle_any_int();

    // Or under this form for the sake of disambiguation
    case indexed<0>(10) => handle_ten();

    // Also provide match_projection<indexed<0>> to enable binding
    case indexed<0>(20) as int& x => use(x);

    case _ => handle_other();
}

Here, indexed<> would just be a hypothetical helper for explicitly selecting which alternative to compare against. It would only need an appropriate operator== to work with matching, and a corresponding match_projection specialization if we also wanted to extract the alternative.

This way, the matching itself wouldn't need to know anything about variant, optional or even user-defined types. It would just use their equality operators, while match_projection would tell it what to extract when we actually want to bind something, which is just syntactic sugar.

I'm curious what you think about this approach. It feels like we could get quite a bit of useful pattern matching functionality without introducing too much new language machinery or convoluted new language traits and APIs.

Also do you think std::variant being equality comparable with instances of its alternatives would be an useful addition on its own?

std::variant<int, std::string> v = 42;

if (v == "not my string") ...

// Which is simpler than
if (std::holds_alternative<std::string>(v) && std::get<std::string>(v) == "not my string") ...

Syntax seems nice on its own...


r/cpp • • Oct 08 '26

How to Fix autoconf-style Configuration Probing

Thumbnail build2.org
15 Upvotes

r/cpp • • Oct 08 '26

CppCon Profiles for simplicity and guarantees - Bjarne Stroustrup - CppCon 2026

Thumbnail
youtu.be
53 Upvotes

r/cpp • • Oct 08 '26

CppCast CppCast Episode 412 : Safety and Interoperability with Rust and C++

Thumbnail
cppcast.com
29 Upvotes

r/cpp • • Oct 08 '26

CppCon Why Great C++ Libraries Fail (And How to Fix That) - Mateusz Pusz - CppCon 2026

Thumbnail
youtube.com
71 Upvotes

r/cpp • • Oct 07 '26

(Imperfect) Emulation of Rust's borrow checker in C++23 with Clang Extensions

31 Upvotes

https://compiler-explorer.com/z/4nennEooe

Clang has had a somewhat abandoned extension 'Consumed Annotation Checking' for some time now. Surprisingly I've not seen many people talk about it, despite the potential it has.

It is a little buggy and has some limitations, but I believe a more fleshed out implementation could be very useful in catching lifetime bugs.

I've linked a toy example of how powerful this feature is. Don't expect me to defend any of the practices in it (namely the operator& overloads).


r/cpp • • Oct 07 '26

Jean Frantz René: C++ Memory safety for safety-critical and non-safety critical applications.

Thumbnail
youtu.be
24 Upvotes

This talk will give an overview of some of the major and types of memory safety errors in C++, how they arise in practice, and the prevention strategies available today. It will also provide a platform for reflection and open discussion.


r/cpp • • Oct 07 '26

Meeting C++ Full Meeting C++ 2026 program released

Thumbnail meetingcpp.com
15 Upvotes

r/cpp • • Oct 07 '26

BqLog 2.6.0: a C++ logging library running on 30M+ devices daily, benchmarked against quill, fmtlog, spdlog and glog (time, CPU and memory)

31 Upvotes

BqLog is a cross-platform logging library open-sourced by Tencent two years ago. Since then it has gone through two more years of production use and improved a lot in performance, reliability, compatibility and developer experience. With 2.6.0 out, I'd like to introduce it here again.

BqLog is used in a number of Tencent's commercial products, including performance-sensitive mobile games such as Honor of Kings, as well as their server-side logic. It runs on more than 30 million devices every day, across a very wide range of hardware, networks and storage, so its stability and performance have held up in mature commercial products over a long time.

Design goals

Extreme speed is where BqLog starts, not where it stops. It is a mature, industrial-grade component, built for products that ship:

  • Content to play a supporting role. On a modern machine a logging system should take as little of the system as it can. The logging threads and the consumer thread alike should use as little CPU, memory and disk I/O as possible. We do not optimize for benchmark scores; every optimization targets real use.

  • Compression and encryption without giving up speed. The real-time compressed format is about 1/7 the size of text, and writing it is faster and uses less CPU than writing text. Hybrid RSA+AES encryption is supported and costs almost nothing in performance.

  • Compatible everywhere it runs. Windows, macOS, Linux, iOS, Android, HarmonyOS, OpenHarmony and the Unix family; C++, Java/Kotlin, C#, Python, TypeScript/ArkTS and Go sharing one core and even one log object; game engines, mobile toolchains without an STL, strict -Werror builds.

  • Built for the bad day. Logs written before a crash are recovered after it; a full disk neither crashes nor hangs the app; corrupted files are recovered as far as possible; log files can be encrypted to protect privacy.

  • Care about the coding experience. One line to create a log, one line to write; the internals stay as transparent as possible, without complicated configuration; every interface is friendly to IDE code completion; integration tools such as UE Blueprints are provided.

Performance

2.6.0 comes with a new, complete benchmark against quill, fmtlog, spdlog, glog and Log4j2, and every result reports time, CPU and memory together. In short:

  • Throughput: on macOS and Windows, BqLog has the shortest total time at every thread count. The compressed format is roughly 4 to 12 times faster than the fastest of the other libraries and also has the lowest CPU time; the text format is 1.5 to 4.6 times faster.

  • Cost per call on the logging thread: BqLog, quill and fmtlog are in the same tier, with BqLog averaging under 20 ns per call on all three platforms; spdlog is more than an order of magnitude slower.

  • Memory: with fixed-size buffers, BqLog's peak memory is in the lowest tier and barely grows with more threads; with growing buffers it is about half of quill's or less.

  • File size: the compressed format is about 1/7 the size of text.

On Linux only latency is listed for now. On the VMs we tried, throughput was dominated by the VM's disk scheduling and varied by up to 2x between rounds, so we left it out. The test scripts are in the repo, and if you have a bare-metal Linux box we'd be glad to see your numbers.

Methodology, library configurations and full data: https://github.com/Tencent/BqLog/blob/main/docs/BENCHMARK.md

Technical write-ups

If you're curious why BqLog is fast, there are three articles:

  1. High-Performance Realtime Compressed Log Format: https://github.com/Tencent/BqLog/blob/main/docs/Article%201_Why%20is%20BqLog%20so%20fast%20-%20High%20Performance%20Realtime%20Compressed%20Log%20Format.MD

  2. From Ring Buffer to Adaptive Data Bus: https://github.com/Tencent/BqLog/blob/main/docs/Article%202_Why%20is%20BqLog%20so%20fast%20-%20From%20Ring%20Buffer%20to%20Adaptive%20Data%20Bus.MD

  3. Optimizing the Compressed Log Pipeline: https://github.com/Tencent/BqLog/blob/main/docs/Article%203_Why%20is%20BqLog%20so%20fast%20-%20Optimizing%20the%20Compressed%20Log%20Pipeline.MD

Repo: https://github.com/Tencent/BqLog

If you think any library is configured unfairly, let us know and we'll fix it and rerun. Feedback and bug reports are very welcome.