build2 0.18.1 released, adds package manager Fetch Cache, JSON Compilation Database, and official binary packages
https://build2.org/release/0.18.0.xhtml
https://redd.it/1so1igj
@r_cpp
https://build2.org/release/0.18.0.xhtml
https://redd.it/1so1igj
@r_cpp
Built a Preemptive Task Scheduler in C++ from scratch: Performance comparison across Windows, Linux, and PREEMPT_RT kernel.
https://prejudice.tistory.com/45
https://redd.it/1so5213
@r_cpp
https://prejudice.tistory.com/45
https://redd.it/1so5213
@r_cpp
Prejudice
C++ Preemptive Task Scheduler 구현 및 성능 비교 (Windows · Linux · Linux PREEMPT_RT)
들어가며최근 며칠 동안 진행 중인 SW PLC 프로젝트의 핵심 로직인 멀티 태스킹(Multi-Tasking) 기능을 구현하는 데 집중하고 있다.이번 작업의 세부 목표는 총 3가지이며, 최종적으로는 사용자의 다중 Task를 선점 스케줄링(Preemptive Scheduling) 방식으로 수행하는 클래스를 개발하려 한다.Multi-Platform 지원: 'Windows', 'Linux', 'Linux PREEMPT_RT Kernel' 환경에서 모두 정상 동작할…
cppreference is back up! but overloaded
I just clicked a link that wasn’t cached and noticed very long loading time. Eventually the page loaded, and I noticed the font was different. After Herb’s post, I was excited and noticed the homepage notice declared the site newly operational again! However I am experiencing a significant number of 5xx errors.
https://redd.it/1so7kx8
@r_cpp
I just clicked a link that wasn’t cached and noticed very long loading time. Eventually the page loaded, and I noticed the font was different. After Herb’s post, I was excited and noticed the homepage notice declared the site newly operational again! However I am experiencing a significant number of 5xx errors.
https://redd.it/1so7kx8
@r_cpp
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
Built an AI overlay that disappears on screen share — one Win32 API call, C++, and a week of evenings
Built this after getting frustrated during technical interviews — an AI assistant that's literally invisible on screen share
I kept wondering why there wasn't a clean way to have a personal reference window open during video calls without it being visible on screen.
Then I found out about SetWindowDisplayAffinity — a Windows API that lets you exclude a window from all capture. OBS, Zoom, Teams, Google Meet — none of them pick it up. The window exists on your screen, nowhere else.
Spent a week building an overlay on top of it. Floating AI assistant. Only you can see it. That's the whole thing.
Shipped it at www.unviewable.online.
For anyone curious about the tech — it's C++ with CMake, the magic is literally one Win32 API call. Windows has had this since Windows 10 2004 and barely anyone talks about it. Wild.
https://redd.it/1sodzjg
@r_cpp
Built this after getting frustrated during technical interviews — an AI assistant that's literally invisible on screen share
I kept wondering why there wasn't a clean way to have a personal reference window open during video calls without it being visible on screen.
Then I found out about SetWindowDisplayAffinity — a Windows API that lets you exclude a window from all capture. OBS, Zoom, Teams, Google Meet — none of them pick it up. The window exists on your screen, nowhere else.
Spent a week building an overlay on top of it. Floating AI assistant. Only you can see it. That's the whole thing.
Shipped it at www.unviewable.online.
For anyone curious about the tech — it's C++ with CMake, the magic is literally one Win32 API call. Windows has had this since Windows 10 2004 and barely anyone talks about it. Wild.
https://redd.it/1sodzjg
@r_cpp
Invisible AI
Invisible AI — The Intelligence They Can't See
A 100% invisible AI assistant for high-stakes interviews and meetings. Bypasses all screen-capture pipelines.
Next week: Interview with Guy Davidson at Meeting C++ online
https://www.meetup.com/de-de/meeting-cpp-online/events/314162009
https://redd.it/1sozbmk
@r_cpp
https://www.meetup.com/de-de/meeting-cpp-online/events/314162009
https://redd.it/1sozbmk
@r_cpp
Meetup
Interview with Guy Davidson, Do., 23. Apr. 2026, 19:00 | Meetup
Meeting C++ is hosting an interview with Guy Davidson! He is the new ISO C++ care taker following Herb Sutter. His background is gamedev and C++, giving talks and mingling
Opinions on Introducing C++: The Easy Way to Start Learning Modern C++ by Frances Buontempo
What do you guys think about the book Introducing C++: The Easy Way to Start Learning Modern C++ by Frances Buontempo i was considering to buy it because i want to learn c++ and i already have some experiences coding in other languages it seems like a sort of successor to accellerated c++
https://redd.it/1sp3epy
@r_cpp
What do you guys think about the book Introducing C++: The Easy Way to Start Learning Modern C++ by Frances Buontempo i was considering to buy it because i want to learn c++ and i already have some experiences coding in other languages it seems like a sort of successor to accellerated c++
https://redd.it/1sp3epy
@r_cpp
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
Using Internal Partitions
https://abuehl.github.io/2026/04/18/using-internal-partitions.html
https://redd.it/1spe1lu
@r_cpp
https://abuehl.github.io/2026/04/18/using-internal-partitions.html
https://redd.it/1spe1lu
@r_cpp
Adrian’s Notes
Using Internal Partitions
Our Core module is in code/Core. The file Core/_Module.ixx contains: export module Core; export import :Attach; export import :Container; export import :CopyRegistry; export import :Diagram; export import :Element; ... This is the interface of the Core module.…
Live Coding in C++ Is Difficult But Not Impossible
https://youtu.be/Tb8Ni1jdcGI?t=989
https://redd.it/1spjik3
@r_cpp
https://youtu.be/Tb8Ni1jdcGI?t=989
https://redd.it/1spjik3
@r_cpp
YouTube
Subroutine Sessions EP00 / Ranjith_hegde :: mayaflux_demo
Three pre-composed pieces and one live-coded piece, performed on a Steam Deck running an Arch Linux container.
All sound and visuals are generated in real time by MayaFlux, an open source C++20 multimedia framework built on Vulkan.
The set moves from stochastic…
All sound and visuals are generated in real time by MayaFlux, an open source C++20 multimedia framework built on Vulkan.
The set moves from stochastic…
mini project
I built a small to-do List project in C++
I'd appreciate if you can take a quick look and give feedback on:
\>File structure
\>Code design
\>Any bad practices
\> the name must be one word like (ex_ex_ex) and i can't solve that
GitHub link: to-do\_list\_cpp/to\_do\_list.cpp at main · TheGreat-A7A/to-do\_list\_cpp
https://redd.it/1spmp6g
@r_cpp
I built a small to-do List project in C++
I'd appreciate if you can take a quick look and give feedback on:
\>File structure
\>Code design
\>Any bad practices
\> the name must be one word like (ex_ex_ex) and i can't solve that
GitHub link: to-do\_list\_cpp/to\_do\_list.cpp at main · TheGreat-A7A/to-do\_list\_cpp
https://redd.it/1spmp6g
@r_cpp
GitHub
to-do_list_cpp/to_do_list.cpp at main · TheGreat-A7A/to-do_list_cpp
simple mini to-do app . Contribute to TheGreat-A7A/to-do_list_cpp development by creating an account on GitHub.
A virtual pointer pattern for dynamic resolution in C++ — years in production
I've been working on Olex2, a crystallography software package, for over 20 years. At some point I needed pointers whose target wasn't a fixed address but a runtime decision — "whatever is currently the active object of this type."
The result was
https://github.com/pcxod/olex2/blob/master/sdl/olxvptr.h
The calling code uses natural pointer syntax and knows nothing about how resolution happens. A concrete use looks like this:
struct VPtr : public olx_virtual_ptr<TXFile> {
virtual IOlxObject *get_ptr() const;
};
olx_vptr<TXFile> thip(new VPtr());
lib->Register(
new TFunction<TXFile>(thip, &TXFile::LibGetFormula, "GetFormula", .....
(https://github.com/pcxod/olex2/blob/master/xlib/xfiles.cpp#L1427)
Single virtual dispatch, fully type-safe, open to any resolution strategy.
I'm surprised this pattern never made it into the standard or common literature. Has anyone seen something similar? Would there be interest in a more formal writeup?
https://redd.it/1spvxx6
@r_cpp
I've been working on Olex2, a crystallography software package, for over 20 years. At some point I needed pointers whose target wasn't a fixed address but a runtime decision — "whatever is currently the active object of this type."
The result was
olx_vptr — a virtual pointer where resolution is delegated to a user-defined get_ptr():https://github.com/pcxod/olex2/blob/master/sdl/olxvptr.h
The calling code uses natural pointer syntax and knows nothing about how resolution happens. A concrete use looks like this:
struct VPtr : public olx_virtual_ptr<TXFile> {
virtual IOlxObject *get_ptr() const;
};
olx_vptr<TXFile> thip(new VPtr());
lib->Register(
new TFunction<TXFile>(thip, &TXFile::LibGetFormula, "GetFormula", .....
(https://github.com/pcxod/olex2/blob/master/xlib/xfiles.cpp#L1427)
Single virtual dispatch, fully type-safe, open to any resolution strategy.
I'm surprised this pattern never made it into the standard or common literature. Has anyone seen something similar? Would there be interest in a more formal writeup?
https://redd.it/1spvxx6
@r_cpp
GitHub
GitHub - pcxod/olex2
Contribute to pcxod/olex2 development by creating an account on GitHub.
I built a calm, readable system monitor for Linux (Qt6, C++20, open source)
Most Linux system monitors end up in one of two places: they feel ancient and cramped, or they show everything at once and become visual noise. I wanted something in between, genuinely useful but still pleasant to look at for more than ten seconds. So I built archvital.
It has a compact Overview page for the numbers that matter most, plus dedicated pages for CPU, GPU, Memory, Disk, Network, Tasks, and a Diagnostics page for common health checks. There is a Settings page for theme colors and section visibility, and preferences are saved through QSettings so the app remembers your layout between sessions.
The whole thing is built on Qt6 and C++20 with custom sidebar, card, sparkline, and bar components. No extra widget library beyond Qt itself.
The project is already daily driveable but still actively evolving. Screenshots are in the repo. If you try it and something looks wrong or reads oddly, that is exactly the kind of feedback I am looking for.
github.com/T9Tuco/archvital
https://redd.it/1sq6siu
@r_cpp
Most Linux system monitors end up in one of two places: they feel ancient and cramped, or they show everything at once and become visual noise. I wanted something in between, genuinely useful but still pleasant to look at for more than ten seconds. So I built archvital.
It has a compact Overview page for the numbers that matter most, plus dedicated pages for CPU, GPU, Memory, Disk, Network, Tasks, and a Diagnostics page for common health checks. There is a Settings page for theme colors and section visibility, and preferences are saved through QSettings so the app remembers your layout between sessions.
The whole thing is built on Qt6 and C++20 with custom sidebar, card, sparkline, and bar components. No extra widget library beyond Qt itself.
The project is already daily driveable but still actively evolving. Screenshots are in the repo. If you try it and something looks wrong or reads oddly, that is exactly the kind of feedback I am looking for.
github.com/T9Tuco/archvital
https://redd.it/1sq6siu
@r_cpp
GitHub
GitHub - T9Tuco/archvital: Open-source system monitor & diagnostics tool for Arch Linux — built with C++20 and Qt6.
Open-source system monitor & diagnostics tool for Arch Linux — built with C++20 and Qt6. - T9Tuco/archvital
SIMD IPv6 lookup vs Patricia trie: surprising real-world results
I’ve been working on a C++ implementation of a SIMD-accelerated IPv6 longest-prefix-match (LPM) structure based on the PlanB paper (linearized B+-tree + AVX-512).
On synthetic workloads, the results were as expected:
\~20× faster than a naive Patricia trie.
But when I switched to a real BGP table (RIPE RIS rrc00, \~254K IPv6 prefixes), I got a surprising result:
A simple Patricia trie can actually match or even outperform the SIMD-based tree.
Numbers (single core, Ice Lake laptop):
\- SIMD tree: \~65–137 MLPS
\- Patricia: \~95 MLPS median
The reason seems to be cache locality and early exits:
\- Patricia often resolves lookups after just a few pointer hops in hot regions of the address space
\- The SIMD tree always pays a fixed traversal cost (depth \~7)
So even though the SIMD approach is more “theoretically efficient”, real-world prefix distribution and access patterns change the outcome quite a bit.
I’m curious if others have observed similar effects in routing / packet processing systems, or when comparing structures like PopTrie / CP-Trie.
Repo (MIT, includes benchmarks + real BGP reproduction):
https://github.com/esutcu/planb-lpm
https://redd.it/1sqe08e
@r_cpp
I’ve been working on a C++ implementation of a SIMD-accelerated IPv6 longest-prefix-match (LPM) structure based on the PlanB paper (linearized B+-tree + AVX-512).
On synthetic workloads, the results were as expected:
\~20× faster than a naive Patricia trie.
But when I switched to a real BGP table (RIPE RIS rrc00, \~254K IPv6 prefixes), I got a surprising result:
A simple Patricia trie can actually match or even outperform the SIMD-based tree.
Numbers (single core, Ice Lake laptop):
\- SIMD tree: \~65–137 MLPS
\- Patricia: \~95 MLPS median
The reason seems to be cache locality and early exits:
\- Patricia often resolves lookups after just a few pointer hops in hot regions of the address space
\- The SIMD tree always pays a fixed traversal cost (depth \~7)
So even though the SIMD approach is more “theoretically efficient”, real-world prefix distribution and access patterns change the outcome quite a bit.
I’m curious if others have observed similar effects in routing / packet processing systems, or when comparing structures like PopTrie / CP-Trie.
Repo (MIT, includes benchmarks + real BGP reproduction):
https://github.com/esutcu/planb-lpm
https://redd.it/1sqe08e
@r_cpp
GitHub
GitHub - esutcu/planb-lpm
Contribute to esutcu/planb-lpm development by creating an account on GitHub.
Freeing up the syntax for a module partition implementation unit
https://www.reddit.com/r/cpp/comments/1scfoh9/comment/oefg9gm/
https://redd.it/1sqduld
@r_cpp
https://www.reddit.com/r/cpp/comments/1scfoh9/comment/oefg9gm/
https://redd.it/1sqduld
@r_cpp
Reddit
GabrielDosReis's comment on "Options for Organizing Partitions"
Explore this conversation and more from the cpp community
Software taketh away faster than hardware giveth: Why C++ programmers keep growing fast despite competition, safety, and AI
https://herbsutter.com/2025/12/30/software-taketh-away-faster-than-hardware-giveth-why-c-programmers-keep-growing-fast-despite-competition-safety-and-ai/
https://redd.it/1sqgbaq
@r_cpp
https://herbsutter.com/2025/12/30/software-taketh-away-faster-than-hardware-giveth-why-c-programmers-keep-growing-fast-despite-competition-safety-and-ai/
https://redd.it/1sqgbaq
@r_cpp
Sutter’s Mill
Software taketh away faster than hardware giveth: Why C++ programmers keep growing fast despite competition, safety, and AI
2025 was another great year for C++. It shows in the numbers Before we dive into the data below, let’s put the most important question up front: Why have C++ and Rust been the fastest-growing major…
I am new to C++, is it just me or is the checklist kinda crazy? How often do you encounter these or plan on making use of them like the newer C++26 features like contracts? Looking for more experienced dev opinions...
I know Python and have been binging C++ for a couple of days now from scratch. C++ feels like a language where you gradually discover a huge checklist of "STATE YOUR INTENT" due to years of probably layering on things to shore up its weaknesses of memory/type safety etc. Like I get it, it's how C++ was designed for things to be explicit and it's like the English language where you don't need to know every word and in this case, feature, but every line of code makes me feel I'm asking a gajillion questions.
So far I have jotted down some stuff that took me awhile to digest...
* const
* constexpr
* [[nodiscard]]
* std::expected
* delete("reason")
* smart pointers
* zero-initialization curly brackets
* structured bindings
* assert
* static assert
* contracts
So I guess I'm not very familiar with the ecosystem or ever worked with other C++ code. Like is this good or bad? I would think it's very safe but do and should people code actually C++ like this? I don't have a frame of reference to relate to and I don't know if the C++ community is going to jump on things like C++26's contracts or reject it. What's the current attitude? If you were a teammate, would you love or hate to see something like this?
[[nodiscard]] constexpr std::expected<int, Error> GetHP(const std::unique_ptr<Player>& player)
{
assert(player);
if (!player) return std::unexpected(Error::NullPlayer);
const auto [hp, alive] = std::pair{player->hp, player->hp > 0};
static_assert(sizeof(int) == 4);
return alive ? hp : 0;
}
https://redd.it/1sqhobx
@r_cpp
I know Python and have been binging C++ for a couple of days now from scratch. C++ feels like a language where you gradually discover a huge checklist of "STATE YOUR INTENT" due to years of probably layering on things to shore up its weaknesses of memory/type safety etc. Like I get it, it's how C++ was designed for things to be explicit and it's like the English language where you don't need to know every word and in this case, feature, but every line of code makes me feel I'm asking a gajillion questions.
So far I have jotted down some stuff that took me awhile to digest...
* const
* constexpr
* [[nodiscard]]
* std::expected
* delete("reason")
* smart pointers
* zero-initialization curly brackets
* structured bindings
* assert
* static assert
* contracts
So I guess I'm not very familiar with the ecosystem or ever worked with other C++ code. Like is this good or bad? I would think it's very safe but do and should people code actually C++ like this? I don't have a frame of reference to relate to and I don't know if the C++ community is going to jump on things like C++26's contracts or reject it. What's the current attitude? If you were a teammate, would you love or hate to see something like this?
[[nodiscard]] constexpr std::expected<int, Error> GetHP(const std::unique_ptr<Player>& player)
{
assert(player);
if (!player) return std::unexpected(Error::NullPlayer);
const auto [hp, alive] = std::pair{player->hp, player->hp > 0};
static_assert(sizeof(int) == 4);
return alive ? hp : 0;
}
https://redd.it/1sqhobx
@r_cpp
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
Avoiding per-cell std::string allocation in a vectorized filter
Writing a small columnar query engine and hit a string-copy trap in the filter operator. The fix turned out to be
measurable so I thought I'd share.
Naive version: output chunk built cell-by-cell.
rows with a few VARCHAR columns means millions of allocations on a single filter pass.
Vectorized version: build a
Trivial for numeric types. For VARCHAR it's trickier:
pointer to a heap-allocated payload for longer ones. Copying the 16 bytes is cheap. The problem is that the
long-string pointer aims at the source vector's string heap. Let src go out of scope and dst's strings point at freed
memory.
The string heap (
adopt src's heap:
No string copies. Refcount bumps once per vector, not once per cell.
A
alone; the rest was unrelated parallelism on another pass.
Question for the sub: is there a standard name for this pattern? "Copy handles that reference an upstream buffer,
retain the buffer as long as any handle lives." Arrow solves the same problem internally.
adoption feels manual. Curious what the idiomatic C++ answer is.
Repo if anyone wants the full context: https://github.com/SouravRoy-ETL/slothdb
https://redd.it/1sqj7ze
@r_cpp
Writing a small columnar query engine and hit a string-copy trap in the filter operator. The fix turned out to be
measurable so I thought I'd share.
Naive version: output chunk built cell-by-cell.
for (idx_t i = 0; i < input.size(); i++) {
if (!matches[i]) continue;
for (idx_t c = 0; c < num_cols; c++)
result.SetValue(c, out, input.GetValue(c, i));
out++;
}
GetValue/SetValue go through a tagged Value type, and for VARCHAR they each allocate a fresh std::string. 1Mrows with a few VARCHAR columns means millions of allocations on a single filter pass.
Vectorized version: build a
uint32_t sel[] of matching row indices, then per column copy with the typed pointer.auto *s = src.GetData<int64_t>();
auto *d = dst.GetData<int64_t>();
for (idx_t i = 0; i < n; i++) d[i] = s[sel[i]];
Trivial for numeric types. For VARCHAR it's trickier:
string_t is a 16-byte type, inline for short strings, apointer to a heap-allocated payload for longer ones. Copying the 16 bytes is cheap. The problem is that the
long-string pointer aims at the source vector's string heap. Let src go out of scope and dst's strings point at freed
memory.
The string heap (
VectorStringBuffer) is already owned via shared_ptr<VectorBuffer>. Fix is a setter that makes dstadopt src's heap:
auto *s = src.GetData<string_t>();
auto *d = dst.GetData<string_t>();
for (idx_t i = 0; i < n; i++) d[i] = s[sel[i]];
dst.SetAuxiliaryPtr(src.GetAuxiliaryPtr()); // dst keeps src's heap alive
No string copies. Refcount bumps once per vector, not once per cell.
A
WHERE ... GROUP BY region query on 1M rows went from 894 ms to ~150 ms. Roughly 100 ms of that was this changealone; the rest was unrelated parallelism on another pass.
Question for the sub: is there a standard name for this pattern? "Copy handles that reference an upstream buffer,
retain the buffer as long as any handle lives." Arrow solves the same problem internally.
shared_ptr<Buffer>adoption feels manual. Curious what the idiomatic C++ answer is.
Repo if anyone wants the full context: https://github.com/SouravRoy-ETL/slothdb
https://redd.it/1sqj7ze
@r_cpp
GitHub
GitHub - SouravRoy-ETL/slothdb: An OLAP analytical database engine built in C++20. Query CSV, Parquet, JSON, and Excel with SQL.…
An OLAP analytical database engine built in C++20. Query CSV, Parquet, JSON, and Excel with SQL. 1.1×–6.6× faster than DuckDB on every format. - SouravRoy-ETL/slothdb
Preventing Integer Overflow in Physical Computations - mp-units
https://mpusz.github.io/mp-units/HEAD/blog/2026/04/11/preventing-integer-overflow-in-physical-computations/
https://redd.it/1sqkrhd
@r_cpp
https://mpusz.github.io/mp-units/HEAD/blog/2026/04/11/preventing-integer-overflow-in-physical-computations/
https://redd.it/1sqkrhd
@r_cpp
mpusz.github.io
Preventing Integer Overflow in Physical Computations - mp-units
The quantities and units library for C++
C++ Growing in a world of competition, safety, and AI
https://www.youtube.com/watch?v=QWqfJtjTAdw
https://redd.it/1sqn0wd
@r_cpp
https://www.youtube.com/watch?v=QWqfJtjTAdw
https://redd.it/1sqn0wd
@r_cpp
YouTube
BeCPP Symposium 2026 - Herb Sutter - C++ Growing in a world of competition, safety, and AI
Event: BeCPP Symposium 2026 ( https://becpp.org/Symposium2026/ )
Slides: https://becpp.org/blog/2026/04/16/slides-of-the-becpp-symposium-2026-sessions/
Speaker: Herb Sutter
Title: C++ Growing in a world of competition, safety, and AI
Abstract:
These are…
Slides: https://becpp.org/blog/2026/04/16/slides-of-the-becpp-symposium-2026-sessions/
Speaker: Herb Sutter
Title: C++ Growing in a world of competition, safety, and AI
Abstract:
These are…