-
Stay up-to-date with everything C++! Content directly fetched from the subreddit just for you. Join our group for discussions : @programminginc Powered by : @r_channels
Building a Fast Lock-Free Queue in Modern C++ From Scratch
https://jaysmito.dev/blog/blog/04-fast-lockfree-queues/
https://redd.it/1tkx59y
@r_cpp
Low-level coding dataset
Disclaimer: this is a repost from something I put in LocalLLaMA, but with some tweaks for the r/cpp crowd - the version over there is more ML focused, this is more code focused
Hi all,
I've recently been thinking about putting together a community sourced coding dataset for finetuning models, with a heavy focus on cpp and systems programming.
My goal is to eventually have a model (say a finetune of Qwen3.6-27b) that is good at stuff like memory ownership, thread safety, optimization concepts, etc. Right now I feel like the coding knowledge of most locally runnable models is restricted to high-level langs like py and js.
Right now I'm thinking a jsonl file with categories like this:
\- generation: basic prompt/code output
\- optimization: heres slow/bloated code, make it better
\- debugging: im getting this error pls fix
\- organization: code review, interface design, restructuring, tradeoff decisions
\- tool_calling: exercises involving tool use and interpreting results
Does anyone have any ideas for things I'm missing? Curious to see what the people over here think about this kind of thing. Are there any knowledge gaps you guys feel current models have that we can maybe try to improve with this?
Thanks in advance for all the help!
https://redd.it/1tk9dgh
@r_cpp
From NIC to P99: Engineering Low-Latency C++ Trading Systems in 2026
https://deepengineering.substack.com/p/from-nic-to-p99-engineering-low-latency
https://redd.it/1tjxc8m
@r_cpp
Exploring ref qualifiers in C++
https://meetingcpp.com/blog/items/Exploring-ref-qualifiers-in-Cpp.html
https://redd.it/1tjni1x
@r_cpp
[RFC] Open Access to Standards Documents - LLVM Project
https://discourse.llvm.org/t/rfc-open-access-to-standards-documents/90856
https://redd.it/1tjb8kf
@r_cpp
FluxUI — write your C++ UI once, run on Windows, Linux, and Android natively
FluxUI — write your C++ UI once, run on Windows, Linux, and Android natively
Most C++ UI frameworks drop the ball on Android. FluxUI doesn't — same C++20 codebase, all three platforms. The framework handles all platform-specific details under the hood so you never have to think about them.
The API is Flutter-inspired (declarative widgets, reactive state), and there's a CLI to scaffold and run projects in two commands.
Just tagged v0.1.0. It's early but the core is solid.
GitHub: https://github.com/HeyItsBablu/flux
Feedback welcome — especially from anyone who's tried cross-platform C++ UI and given up.
https://redd.it/1tj6vin
@r_cpp
(Maybe) All The Contract Papers
https://a4z.noexcept.dev/blog/2026/05/20/The-Contract-Papers.html
https://redd.it/1tisbs2
@r_cpp
Should I continue learning C++?
I’m not sure if this is the right subreddit, but I just needed to put this somewhere. My ex (M20) and I (F20) broke up about 2 weeks ago. Before our breakup, he was teaching me C++, his favourite language. I also code, but only in Python, so C++ felt pretty different to me and I was still at a very beginner stage. The thing is, I still want to keep learning it on my own, as I find it pretty interesting. But now, every time I try to write C++, I immediately think of him and end up feeling weirdly emotionally loaded for no particular reason. It feels a bit ridiculous because it’s literally just C++. At this point I'm not sure if I should keep going with C++ or just pick up another language.
https://redd.it/1tir7yz
@r_cpp
Qt Creator 20: faster clangd
https://www.qt.io/blog/qt-creator-20-faster-clangd
https://redd.it/1tilatn
@r_cpp
Introducing Sample Profile Guided Optimization in MSVC
https://devblogs.microsoft.com/cppblog/introducing-sample-profile-guided-optimization-in-msvc
https://redd.it/1tig36r
@r_cpp
C++26: More function wrappers
https://www.sandordargo.com/blog/2026/05/20/cpp26-copyable-function
https://redd.it/1tic32u
@r_cpp
citor: a header-only C++20 thread pool tuned for sub-µs dispatch
https://github.com/Lallapallooza/citor
https://redd.it/1thr04d
@r_cpp
Latest News From Upcoming C++ Conferences (2026-05-19)
This is the latest news from upcoming C++ Conferences. You can review all of the news at [https://programmingarchive.com/upcoming-conference-news/](https://programmingarchive.com/upcoming-conference-news/)
**TICKETS AVAILABLE TO PURCHASE**
The following conferences currently have tickets available to purchase
* **ADC Japan (1st – 3rd June) (Last Chance)** – You can buy tickets at [https://peatix.com/event/4840445](https://peatix.com/event/4840445)
* **ACCU on Sea (15th – 20th June)** – You can buy standard tickets at [https://accuonsea.uk/tickets/](https://accuonsea.uk/tickets/) with discounts available for ACCU members.
* **CppCon (12th – 18th September)** – You can buy early bird tickets until June 26th at [https://cppcon.org/registration/](https://cppcon.org/registration/)
* **C++ Under The Sea** **(NEW – 14th – 16th October)** – You can buy early bird tickets at [https://sales.ticketing.cm.com/cppunderthesea2026/](https://sales.ticketing.cm.com/cppunderthesea2026/)
* **Meeting C++ (26th – 28th November)** – You can buy early bird tickets at [https://meetingcpp.com/2026/](https://meetingcpp.com/2026/)
**OPEN CALL FOR SPEAKERS**
* **Meeting C++** **(NEW)** – Interested speakers have until June 4th to submit their talks for Meeting C++ which is scheduled to take place on 26th – 28th November. Find out more including how to submit your proposal at [https://meetingcpp.com/meetingcpp/news/items/Submit-your-talks-to-Meeting-Cpp-2026-.html](https://meetingcpp.com/meetingcpp/news/items/Submit-your-talks-to-Meeting-Cpp-2026-.html)
**OTHER OPEN CALLS**
* **CppCon Call For Authors Now Open!** – CppCon are looking for book authors who want to engage with potential reviewers and readers. Read the full announcement at [https://cppcon.org/call-for-author-2026/](https://cppcon.org/call-for-author-2026/)
**TRAINING COURSES AVAILABLE FOR PURCHASE**
Conferences are offering the following training courses:
**Last Chance To Register:**
1. **From Hello World to Real World – A Hands-On C++ Journey from Beginner to Advanced** – Amir Kirsh – 1 day online workshop available on *Thursday 21st May 08:30 – 16:30 UTC –* [https://cpponline.uk/workshop/from-hello-world-to-real-world/](https://cpponline.uk/workshop/from-hello-world-to-real-world/)
2. **AI++ 101 – Build an AI Coding Assistant in C++** – Jody Hagins – 1 day online workshop available on *Friday 22nd May 09:00 – 17:00 UTC* – [https://cpponline.uk/workshop/ai-101/](https://cpponline.uk/workshop/ai-101/)
3. **AI++ 201 – Build a Matching Engine with Claude Code** – Jody Hagins – 2 day online workshop available on *May 28th – May 29th 09:00 – 17:00 UTC* – [https://cpponline.uk/workshop/ai-201/](https://cpponline.uk/workshop/ai-201/)
4. **Splice & Dice – A Field Guide to C++26 Static Reflection** – Koen Samyn – Half Day online workshop available on *Monday 25th May 09:00 – 12:30 UTC* – [https://cpponline.uk/workshop/splice-and-dice/](https://cpponline.uk/workshop/splice-and-dice/)
**NEW WORKSHOP**
1. **AI++ 101 – Build an AI Coding Assistant in C++** – Jody Hagins – 1 day online workshop available on *Friday 24th July 16:00 – 00:00 UTC* – [https://cpponline.uk/workshop/ai-101/](https://cpponline.uk/workshop/ai-101/)
All of these workshops had previews at the main C++Online Conference which took place on the 11th – 13th March. You can watch these preview sessions here: [https://www.youtube.com/playlist?list=PLHG0uo5c6V3KIeoLqvBbIqy5AXt\_Me\_cm](https://www.youtube.com/playlist?list=PLHG0uo5c6V3KIeoLqvBbIqy5AXt_Me_cm)
**Anyone who purchased a C++Online Main Conference ticket can also get a discount of however much they paid to attend the main conference.**
Also if anyone is from a lower-income background or live in a country where purchasing power is limited, then it is recommended to reach out to C++Online on [info@cpponline.uk](mailto:info@cpponline.uk) as they will be able to give you a discount.
**ACCU on Sea Two Day Workshops**
1. **C++ Best Practices** – Jason Turner – 2 day in-person workshop available on 15th &
Boost 1.91.0 is now available in both Conan and vcpkg
https://www.boost.org/releases/1.91.0/
https://redd.it/1thmvoo
@r_cpp
Announcing iceoryx2 v0.9: Fast and Robust Inter-Process Communication (IPC) Library
https://ekxide.io/blog/iceoryx2-0.9-release/
https://redd.it/1thjy1m
@r_cpp
I built a SQL-like relational database engine in C++ from scratch
Hey r/cpp,
I’ve been learning systems programming and database internals, so I started building **Ark** — a SQL-like relational database engine written entirely from scratch in C++.
Current features include:
* Handwritten tokenizer ( lexer )
* Recursive descent parser
* CRUD operations
* INNER / LEFT / RIGHT / FULL joins
* Aggregate functions
* `ALTER TABLE` support
* File persistence
* Custom diagnostics system
Everything is implemented manually:
* no parser generators
* no embedded SQL engines
* no external dependencies
One of the most challenging parts so far has been handling joins, schema evolution, and persistence consistency cleanly.
GitHub:
[https://github.com/kashyap-devansh/Ark](https://github.com/kashyap-devansh/Ark)
I’d especially appreciate feedback around architecture, parser design, query execution, or persistence design.
https://redd.it/1tkrhxq
@r_cpp
Why yes; Yes I will be watching this! 🙂
https://youtu.be/NXwTRzywDSk
edit: I remember playing with Cfront and then finally Borland C++ made me put Pascal aside and C++ has been my absolute favorite ever since. 😄
STL, Boost, variadic template meta-programming, MFC, been a fantastically fun time since it was always my favorite language. Don't get me wrong I love all the other grammars too. The compilers for them? C++
But no Scott Meyers?! That is surprising but then again the language has had a lot of heroes.
https://redd.it/1tk8iuy
@r_cpp
Kodsnack 703 - The subset needs to fit you
https://kodsnack.se/703/
https://redd.it/1tjpwn7
@r_cpp
Is cppreference.com compiler support up to date again?
https://en.cppreference.com/cpp/compiler_support
https://redd.it/1tjej6t
@r_cpp
C++ profiles: a chance to fix some annoying defaults? Brainstorming and ideas.
Hello everyone,
Lately I have been thinking about the opportunity that profiles could give to C++ for "better defaults" and "cleanups".
Which profiles would you like to see in an eventually profile-enforced version as "standard" or "enabled by default" that you think can be fit reasonably?
I will start:
- ununitialized variables: must use [indeterminate]
- [nodiscard] by default? Would that be possible? Maybe this changes the meaning.
- hardened std lib guarantee?
- type safety/bounds safety (in user code)
https://redd.it/1tja9zr
@r_cpp
reflection-first ORM using C++ 26
C++ 26 reflection got me excited about what future library APIs could look like, so I experimented with a small reflection-first ORM using annotations
https://github.com/swordfatih/reflect
https://redd.it/1tiw81e
@r_cpp
Coroutines, part I: Co-operators and Promises
https://www.youtube.com/watch?v=wmrW6AkRo3c
https://redd.it/1tiu1ry
@r_cpp
Conex – single-header C++20 library for condition-based binary pattern matching
I built a small single-header library called Conex for binary pattern matching with lambda conditions.
The idea: instead of hard-coded byte signatures, you express each match condition as a lambda that inspects the raw bytes. The pattern syntax is regex-style — (c0:4)(c1:8)\* means "4 bytes satisfying lambda 0, followed by zero or more 8-byte groups satisfying lambda 1".
// Find a struct by its signature + page-aligned address fields
auto result = conex::search_first(blob, "(c0:4)(c1:8)*",
[](std::span<const uint8_t> s) {
uint32_t sig; std::memcpy(&sig, s.data(), 4);
return sig == 0xDEADBEEF;
},
[](std::span<const uint8_t> s) {
uint64_t addr; std::memcpy(&addr, s.data(), 8);
return (addr & 0xFFF) == 0; // page-aligned
}
);
Useful for reverse engineering, game modding, firmware analysis, or anywhere you're scanning binary blobs for structures you can identify semantically but not by fixed offsets.
Single header, no dependencies, C++20.
[https://github.com/DanielCohen197/Conex](https://github.com/DanielCohen197/Conex)
Happy to hear feedback!
https://redd.it/1tiny5t
@r_cpp
IPC benchmark: ~3M msg/s and ~7 GB/s on macOS. Missing bare-metal Linux numbers
I've been optimizing the IPC layer of areg-sdk, an open-source C++ framework I maintain. Here are the numbers and methodology.
**What was measured**:
Numbers are taken at `mtrouter` (the framework's message router), which sees both directions simultaneously and is more accurate point in the pipeline.
* **macOS (Apple M3 Pro, LPDDR5):** \~2.5–3.0M msg/s at \~0.5 KB payload, \~6.5–7.0 GB/s at \~3 MB payload
* **Windows 11 (Intel i7-13700H, DDR4):** \~1.0–1.2M msg/s at \~0.5 KB payload, \~2.4–2.6 GB/s at \~3 MB payload
* **WSL2 (Intel i7-13700H, DDR4):** \~450–520K msg/s at \~0.5 KB payload, \~5.0–5.6 GB/s at \~3 MB (after network tuning)
* **Linux VM on macOS:** results close to macOS native
*What is included in these numbers:* TCP `localhost` loopback, 1:1 (provider -> mtrouter -> consumer). The stack includes: event creation, multithreading, event queuing, event dispatching, and socket communication. Service discovery, automatic framing, and thread dispatch are all active.
*Note:* the benchmark example (`23_pubdatarate`) is optimized for throughput pressure. It pre-builds messages to maximize network load.
*What is not included:* The consumer has a lower stable dispatch ceiling before its internal queue grows unbounded and memory climbs: *\~300–400K msg/s* on Windows, *\~500–600K msg/s* on macOS. Above those rates the dispatch thread becomes the bottleneck. I'm working on improving it.
**Missing: bare-metal Linux**
All Linux measurements so far come from VMs (WSL2 and a Linux VM on macOS). VM overhead varies too much to extrapolate confidently. Based on macOS results, bare-metal x86-64 Linux should be (estimated) \~*6.0–7.5 GB/s* for large payloads and \~*2.0–3.0M msg/s* for small payloads, *\~500K msg/s* stable dispatch.
The benchmark is self-contained. If anyone runs it on bare-metal Linux, the results would be interesting to compare. README has exact commands to set:
[https://github.com/aregtech/areg-sdk/tree/master/examples/23\_pubdatarate](https://github.com/aregtech/areg-sdk/tree/master/examples/23_pubdatarate)
**Useful data points:**
* distro/kernel
* CPU model and class (mobile/desktop/server)
* RAM type (DDR4/DDR5/LPDDR5)
* measured msg/s and data rate per recipe
* stable consumption before memory growth starts.
Happy to answer questions about methodology or implementation.
P.S. About areg-sdk: C++17 Service-oriented framework with ORPC for distributed development. Targets: Linux/Windows/macOS; RTOS is the next step. GitHub: [https://github.com/aregtech/areg-sdk](https://github.com/aregtech/areg-sdk)
https://redd.it/1til14z
@r_cpp
Hey, Anybody intrested in a Remote Robotics Simulation Engineer Job? $180/hr - $200/hr
DM me for more
# What You'll Do
Design and implement high-fidelity robot models (URDF/MJCF) with accurate kinematics, dynamics, and contact properties
Build and maintain simulation environments using MuJoCo, NVIDIA Isaac Sim, and/or Gazebo
Develop end-to-end simulation pipelines for robot training, testing, and validation
Tune physics parameters — friction, damping, inertia, actuator models — to maximize sim-to-real transfer
Integrate simulations with ROS2 for perception, planning, and control workflows
Write clean, performant code in Python and/or C++ to support simulation infrastructure
Collaborate asynchronously with robotics researchers and engineers on model accuracy and environment design
Profile and optimize simulation performance for large-scale or parallelized runs
Document simulation configurations, model parameters, and pipeline architecture
# Requirements
Strong hands-on experience with at least one major robotics simulator: MuJoCo, NVIDIA Isaac Sim, or Gazebo
Proficient in Python and/or C++ in a robotics or scientific computing context
Solid understanding of rigid-body dynamics, contact mechanics, and control theory
Experience creating and validating robot models (URDF, MJCF, or SDF formats)
Familiarity with ROS2 and its integration with simulation environments
https://redd.it/1tic2i0
@r_cpp
Virtual dispatch isn't always the slowest, and std::variant isn't always the fastest
https://shubhankar-gambhir.github.io/posts/four-ways-to-dispatch-a-runtime-selected-strategy-in-cpp/
https://redd.it/1thyi97
@r_cpp
16th June 10:00 – 18:00 – [https://accuonsea.uk/2026/sessions/cpp-best-practices/](https://accuonsea.uk/2026/sessions/cpp-best-practices/)
2. **C++ Templates for Developers** – Walter E Brown – 2 day in-person workshop available on 15th & 16th June 10:00 – 18:00 – [https://accuonsea.uk/2026/sessions/cpp-templates-for-developers/](https://accuonsea.uk/2026/sessions/cpp-templates-for-developers/)
3. **Talking Tech (A Speaker Training Workshop)** – Sherry Sontag & Peter Muldoon – 2 day in-person workshop available on 15th & 16th June 10:00 – 18:00 – [https://accuonsea.uk/2026/sessions/talking-tech-a-speaker-training-workshop/](https://accuonsea.uk/2026/sessions/talking-tech-a-speaker-training-workshop/)
**ACCU on Sea One Day Workshops**
1. **C++ Software Design** – Klaus Iglberger – 1 day in-person workshop available on 15th June 10:00 – 18:00 – [https://accuonsea.uk/2026/sessions/cpp-software-design/](https://accuonsea.uk/2026/sessions/cpp-software-design/)
2. **C++23 in Practice: A Complete Introduction** – Nicolai M. Josuttis – 1 day in-person workshop available on 16th June 10:00 – 18:00 – [https://accuonsea.uk/2026/sessions/cpp23-in-practice-a-complete-introduction/](https://accuonsea.uk/2026/sessions/cpp23-in-practice-a-complete-introduction/)
3. **Secure Coding in C and C++** – Robert C. Seacord – 1 day in-person workshop available on 16th June 10:00 – 18:00 – [https://accuonsea.uk/2026/sessions/secure-coding-in-c-and-cpp/](https://accuonsea.uk/2026/sessions/secure-coding-in-c-and-cpp/)
All ACCU on Sea workshops take place in-person in Folkestone, England.
**OTHER NEWS**
* **(NEW) – CppCon 2026 Attendance Support Ticket Program Now Open!** – Includes free tickets for people who would not be able to attend otherwise. Find out more including how to apply at [https://cppcon.org/cppcon-2026-attendance-support-ticket-program/](https://cppcon.org/cppcon-2026-attendance-support-ticket-program/)
* **C++ Under The Sea 2026 Announced** – C++ Under The Sea will once again take place on 15 & 16th October 2026 at Breepark in Breda, the Netherlands
* **C++ Under The Sea 2026 Workshops Announced** – C++ Under The Sea have announced 3 workshops that will take place on the 14th October 2026. Find out more at [https://cppunderthesea.nl/#workshops](https://cppunderthesea.nl/#workshops)
https://redd.it/1thqvct
@r_cpp
Kiln - A CMake-compatible build system that can do what CMake can't
https://clehaxze.tw/gemlog/2026/05-17-releasing-kiln-a-cmake-compatiable-build-system-that-can-do-what-cmake-cant.gmi
https://redd.it/1thqwvv
@r_cpp
Clang Lifetime Safty Doc Update
https://clang.llvm.org/docs/LifetimeSafety.html
https://redd.it/1thkhtd
@r_cpp
Managing context limits in large C++20 Module codebases with MCP (Case Study & Tool)
Hi everyone,
Working with LLMs on modern C++ codebases usually hits a wall very quickly: context windows get flooded with massive files, and most standard indexers still struggle with C++20 Module partitions and imports.
We are currently running a live development workflow on a large-scale commercial project consisting of over 7,000 source files, mostly utilizing C++20 modules.
We managed to establish a highly performant workflow using the Codex App on the desktop, combined with VS MCP, IDAP MCP, and a dedicated lightweight tool we created to bridge the C++ gap: mcp-cpp-project-indexer.
The Problem We Solved
Standard file-dumping or naive regex indexing either sends thousands of lines of irrelevant code to the LLM (costly and slow) or completely loses track of C++20 module dependencies.
Instead of trying to replace a full compiler/LSP (like clangd) or performing heavy semantic analysis, our indexer acts purely as a stream- and token-based locator. It maps out files, symbols, and module structures, providing the LLM with exact line references (startLine/endLine).
The Setup & Results
The Stack: Codex App + VS MCP + IDAP MCP + `mcp-cpp-project-indexer`.
Token Reduction: The LLM only requests and reads the exact code fragments it actually needs. This reduces the text sent to the LLM by up to 86%.
Performance: Written in Python, it includes a file watcher mode that calculates hashes incrementally. It stays up-to-date in real-time during active development without hammering the CPU.
Intelligence: Code/ChatGPT confirmed that the context routing works flawlessly even at this 7,000-file scale.
Why share this?
When we started, we couldn't find a lightweight, production-ready way to make Claude/GPT understand a massive C++20 module graph without spending a fortune on API tokens or waiting ages for context processing. This setup proved that the Model Context Protocol (MCP) is absolutely ready for large enterprise codebases if decoupled correctly.
The project is fully open-source. If you are struggling with C++ context limits or modules in your AI workflow, feel free to check it out, spin it up, or contribute:
👉 GitHub: github.com
I’m happy to answer any questions about how we configured the MCP synergy or how the incremental indexing handles the C++20 module tree!
https://redd.it/1thgx5h
@r_cpp