r/cpp • u/meetingcpp • Feb 28 '26
r/cpp • u/No-Dentist-1645 • Feb 28 '26
Power of C++26 Reflection: Strong (opaque) type definitions
Inspired by a similar previous thread showcasing cool uses for C++26 reflection.
With reflection, you can easily create "opaque" type definitions, i.e "strong types". It works by having an inner value stored, and wrapping over all public member functions.
Note: I am using queue_injection { ... } with the EDG experimental reflection, which afaik wasn't actually integrated into the C++26 standard, but without it you would simply need two build stages for codegen. This is also just a proof of concept, some features aren't fully developed (e.g aggregate initialization)
struct Item { /* ... */ }; // name, price as methods
struct FoodItem;
struct BookItem;
struct MovieItem;
consteval {
make_strong_typedef(^^FoodItem, ^^Item);
make_strong_typedef(^^BookItem, ^^Item);
make_strong_typedef(^^MovieItem, ^^Item);
}
// Fully distinct types
void display(FoodItem &i) {
std::cout << "Food: " << i.name() << ", " << i.price() << std::endl;
}
void display(BookItem &i) {
std::cout << "Book: " << i.name() << ", " << i.price() << std::endl;
}
int main() {
FoodItem fi("apple", 10); // works if Item constructor isn't marked explicit
FoodItem fi_conversion(Item{"chocolate", 5}); // otherwise
BookItem bi("the art of war", 20);
MovieItem mi("interstellar", 25);
display(fi);
display(bi);
// display(Item{"hello", 1}); // incorrect, missing display(Item&) function
// display(mi); // incorrect, missing display(MovieItem&) function
}r/cpp • u/According_Leopard_80 • Feb 28 '26
Mocking the Standard Template Library
middleraster.github.ioWriting a test double for just one function or type in the STL can be achieved with "Test Base Class Injection" and namespace shadowing.
r/cpp • u/mropert • Feb 27 '26
What makes a game tick? Part 9 - Data Driven Multi-Threading Scheduler · Mathieu Ropert
mropert.github.ior/cpp • u/KeyAlbatross6044 • Feb 27 '26
Good, basic* game networking library?
I want to get a simple server-client system up for a multiplayer game, and I've been poking around to find some simple networking implementations but haven't found many. I've used enet itself before but I would like something a little more friendly in terms of usability? I know it's good but something about it is not terribly enjoyable to use for games.
r/cpp • u/TheRavagerSw • Feb 28 '26
Language specific package managers are a horrible idea
Package managers should only deal with package cache and have a scripting interface.
Package managers trying to act smart only makes our jobs harder as evidenced by looking at the issue pages of global package registries.
I recommend everyone here to switch to Conan and not use any abstractions for the build systems, disable remote and use a deployment script or using full deploy as an option. It is not ideal, but it doesn't stand in your way.
r/cpp • u/emilios_tassios • Feb 27 '26
Parallel C++ for Scientific Applications: Introduction to Distributes Parallelism
youtube.comIn this week’s lecture Dr. Hartmut Kaiser, shifts the focus to distributed parallelism in computing, specifically addressing the programming of massively parallel machines with thousands of nodes and millions of cores. The lecture contrasts sequential execution and shared memory parallelization with distributed systems, presenting key scalability concepts like Amdahl's Law, inter-process communication, and weak versus strong scaling.
A core discussion introduces the Single Program Multiple Data (SPMD) pattern, demonstrating its practical implementation using HPX for collective operations and parallel computations. Finally, the lecture explores integrating Python with C++ for performance optimization, offering a comprehensive workflow for building highly scalable, distributed high-performance applications.
If you want to keep up with more news from the Stellar group and watch the lectures of Parallel C++ for Scientific Applications and these tutorials a week earlier please follow our page on LinkedIn https://www.linkedin.com/company/ste-ar-group/
Also, you can find our GitHub page below:
https://github.com/STEllAR-GROUP/hpx
r/cpp • u/Specific-Housing905 • Feb 26 '26
The Joy of C++26 Contracts - Myths, Misconceptions & Defensive Programming - Herb Sutter
youtube.comr/cpp • u/ProgrammingArchive • Feb 26 '26
Latest News From Upcoming C++ Conferences (2026-02-26)
This is the latest news from upcoming C++ Conferences. You can review all of the news at https://programmingarchive.com/upcoming-conference-news/
TICKETS AVAILABLE TO PURCHASE
The following conferences currently have tickets available to purchase
C++Online (11th – 13th March)
- Main Conference (Last Chance) – Last chance to purchase tickets for the 3 day 3 track online conference which features 3 keynotes and over 25 sessions. Tickets are available at https://cpponline.uk/registration/ from £50!
- Workshops (NEW) – C++Online have also launched tickets for their workshops which costs £345 for a full day workshop and £172.5 for a half day workshop. Find out more about the workshops at https://cpponline.uk/workshops/
- ADCx India (29th March) – Tickets are now available at https://www.townscript.com/e/adcxindia26 until 20th February
- CppNorth/NDC Toronto (5th – 8th May) – Tickets are open and can be purchased at https://ndctoronto.com/tickets until 16th February
- ACCU on Sea (15th – 20th June) – You can buy early bird tickets at https://accuconference.org/booking with discounts available for ACCU members.
OPEN CALL FOR SPEAKERS
- ADC Japan 2026 – ADC Japan are looking for proposals focused on educating their audience of audio software developers by 2nd March. Find out more and submit your proposal at https://docs.google.com/forms/d/e/1FAIpQLScPzOfdUgUDazP9gLK6HrqZ1KEsUXqW3CC65FW3DRPgd4-LCw/viewform
OTHER OPEN CALLS
C++Online
Call For Open Content (Last Chance) – Get a FREE ticket to C++Online 2026 by…
- Presenting a talk, demo or workshop as open content at the start or end of each day of the event. Find out more and apply at https://cpponline.uk/call-for-open-content/
- Running a meetup or host a social event like a pub quiz or a tetris tournament. Find out more and apply at https://cpponline.uk/call-for-meetups/
C++Now
- Call For Volunteers (Last Chance) – Attend C++Now 2026 FOR FREE by becoming a volunteer! Find out more including how to apply at https://cppnow.org/announcements/2026/01/accepting-student-volunteer-applications-for-2026/
TRAINING COURSES AVAILABLE FOR PURCHASE
Conferences are offering the following training courses:
C++Online
- AI++ 101 – Build an AI Coding Assistant in C++ – Jody Hagins – 1 day online workshop available on Tuesday 31st March 13:00 – 21:00 UTC & Friday 22nd May 09:00 – 17:00 UTC – https://cpponline.uk/workshop/ai-101/
- AI++ 201 – Build a Matching Engine with Claude Code – Jody Hagins – 2 day online workshop available on April 20th – April 21st 13:00 – 21:00 UTC & May 28th – May 29th 09:00 – 17:00 UTC – https://cpponline.uk/workshop/ai-201/
- From Hello World to Real World – A Hands-On C++ Journey from Beginner to Advanced – Amir Kirsh – 1 day online workshop available on Monday 6th April 09:00 – 17:00 UTC – https://cpponline.uk/workshop/from-hello-world-to-real-world/
- Performance and Safety in C++ Crash Course – Jason Turner – 1 day online workshop available on Thursday 9th April 12:00 – 20:00 UTC – https://cpponline.uk/workshop/performance-and-safety-in-cpp-crash-course/
- Splice & Dice – A Field Guide to C++26 Static Reflection – Koen Samyn – Half Day online workshop available on Thursday 2nd April 13:00 – 16:30 UTC & Monday 25th May 09:00 – 12:30 UTC – https://cpponline.uk/workshop/splice-and-dice/
- Stop Thinking Like a Junior – The Soft Skills That Make You Senior – Sandor Dargo – Half Day online workshop available on Friday 10th April 13:00 – 16:30 UTC & Friday 8th May 20:00 – 23:30 UTC – https://cpponline.uk/workshop/stop-thinking-like-a-junior/
- Jumpstart to C++ in Audio – Learn Audio Programming & Create Your Own Music Plugin/App with the JUCE C++ Framework – Jan Wilczek – 1 day online workshop available on both Tuesday 14th April 13:00 – 20:00 UTC & Tuesday 28th April 07:00 – 14:00 UTC – https://cpponline.uk/workshop/jumpstart-to-cpp-in-audio/
- Essential GDB and Linux System Tools – Mike Shah – 1 day online workshop available on Friday 17th April 13:00 – 21:00 UTC – https://cpponline.uk/workshop/essential-gdb-and-linux-system-tools/
- Concurrency Tools in the C++ Standard Library – Mateusz Pusz – 1 day online workshop available on Friday 24th April 09:00 – 17:00 UTC – https://cpponline.uk/workshop/concurrency-tools-in-the-cpp-standard-library/
- C++ Software Design – Klaus Iglberger – 1 day online workshop available on Thursday 30th April 09:00 – 17:00 UTC – https://cpponline.uk/workshop/cpp-software-design/
- Safe C++ – Klaus Iglberger – 1 day online workshop available on Friday 1st May 09:00 – 17:00 UTC – https://cpponline.uk/workshop/safe-cpp/
- Safe and Efficient C++ for Embedded Environments – Andreas Fertig – 1 day online workshop available on Tuesday 12th May 09:00 – 17:00 UTC – https://cpponline.uk/workshop/safe-and-efficient-cpp-for-embedded-environments/
- Mastering std::execution (Senders/Receivers) – Mateusz Pusz – 1 day online workshop available on Friday 15th May 09:00 – 17:00 UTC – https://cpponline.uk/workshop/mastering-stdexecution-senders-receivers/
- How C++ Actually Works – Hands-On With Compilation, Memory, and Runtime – Assaf Tzur-El – One day online workshop that runs over two days on May 18th – May 19th 16:00 – 20:00 UTC – https://cpponline.uk/workshop/how-cpp-actually-works/
Most of these workshops will be available to preview by purchasing a ticket to the main C++Online Conference which is taking place from March 11th – 13th.
OTHER NEWS
- (NEW) C++Online Keynotes Annouced – C++Online have announced David Sankel, Jason Turner & Inbal Levi as their 3 keynotes.
- (NEW) C++Online Initial Schedule Published – The schedule includes 25 talks across 3 days. Find out more including how you can attend for only £50 at https://cpponline.uk/cpponline-2026-schedule-published/
- (NEW) C++Online Workshops Announced – C++Online have announced 14 workshops that will take place between the end of March and the start of June with more potentially being added if any workshops are oversubscribed. Find out more including the workshops that are available at https://cpponline.uk/workshop-tickets-for-cpponline-2026-now-available/
- ADC 2026 Announced – The 11th annual Audio Developer Conference will take place from the 9th – 11th November both in Bristol, UK & Online! Find out more at https://audio.dev/adc-bristol-26-3/
Finally anyone who is coming to a conference in the UK such as C++ on Sea or ADC from overseas may now be required to obtain Visas to attend. Find out more including how to get a VISA at https://homeofficemedia.blog.gov.uk/electronic-travel-authorisation-eta-factsheet-january-2025/
r/cpp • u/RelevantError365 • Feb 25 '26
Status of cppreference.com
Does anyone know what's going on with cppreference.com? It says “Planned Maintenance,” but it's been like that for almost a year now.
r/cpp • u/TheRavagerSw • Feb 26 '26
Will we ever have a backwards compatible binary format for C++ modules?
I'm not talking about modules interface files, those are just headers without macros. What I mean is that I have a cpp source file that exports a module and I compile it and use it a later standard. Or a higher compiler version.
Modules currently, just like most of C++ features are extremely inconsistent, you either lock your toolchain very tightly and use compiler artifacts, or you build everything in your project.
Both approaches aren't really favourable, having something backward compatible and something not compatible is weird. İt is just so inconsistent.
C++ isn't a centralised language, we have multiple stdlibs compilers etc. So expecting everything to be build by a single build system is a harmful fantasy.
Do people on the committee actually care about how we build stuff? Because the way modules work now is so inconsistent it does not make sense.
r/cpp • u/FlyingRhenquest • Feb 25 '26
Autocrud: Automatic CRUD Operations with C++26 Reflection
I just did the initial check-in of my Autocrud project, which provides a templated class you can use to perform CRUD operations into a PostgreSQL database.
Autocrud does expect you to derive your class from a Node type I provide, but this is a design decision for this project and not a fundamental restriction caused by reflection. This object could easily be modified to not do that.
It does what it says it does. The table that gets created in your database will be named after the structure you derive from Node. The columns in the database will be named the same as the data members in your class. Writing one object will populate a row in the database. The unit and integration tests have some basic usage. The object does expose a tuple of table information which AutocrudTests.cpp queries to make sure my annotations are being handled correctly. IntegrationTests.cpp has a test that derives a structure and does a round trip to validate database functionality.
The project provides some basic annotations to rename or ignore members in your struct, as well as one you can use to set the database type of the object.
I'm going to do a lot more work on this, but since people are curious about reflection right now and it's working reasonably well I wanted to make it public as quickly as possible. Between this and autocereal I'm well on my way to building "C++ on Rails" lol. I still need to build an Autopistache (which can leverage autocereal for serialization,) automate emscripten bindings and maybe do some basic automated GUI with Imgui or Qt or something that I can compile to emscripten to provide the full stack C++ platform.
r/cpp • u/c0r3ntin • Feb 24 '26
Clang 22 Release Notes
releases.llvm.orgLLVM 22 was released, update your toolchains!
Algorithmic differentiation for domain specific languages in C++ with expression templates
arxiv.orgr/cpp • u/oleksandrkvl • Feb 24 '26
Making generic wrapper for a niche binary format using meta tags
oleksandrkvl.github.ioISO C++ WG21 2026-02 pre-Croydon mailing is now available!
open-std.orgThe hounds have been released!
The 2026-02 pre-Croydon mailing is now available: 80 papers taking up 12MB.
r/cpp • u/VincentZalzal • Feb 23 '26
CppCast The return of CppCast!
youtu.beJason Turner is taking back the helm of the podcast! Thank you Jason, I was really missing that podcast to stay up-to-date with C++ news.
r/cpp • u/robwirving • Feb 23 '26
CppCast CppCast: Job Hunting and Optimizing Compilers with Jamie Pendergast
cppcast.comr/cpp • u/ProgrammingArchive • Feb 23 '26
New C++ Conference Videos Released This Month - February 2026 (Updated To Include Videos Released 2026-02-16 - 2026-02-22)
CppCon
2026-02-16 - 2026-02-22
- Back to Basics: C++ Concepts - Jeff Garland - CppCon 2025 - https://youtu.be/NpuNUGifL1M
- Back to Basics: How To Improve C++ Code Reviews - Chandranath Bhattacharyya & Kathleen Baker - CppCon 2025 - https://youtu.be/mMrIwY1n74g
- Practical Reflection With C++26 - Barry Revzin - CppCon 2025 - https://youtu.be/ZX_z6wzEOG0
- Duck Typing, the C++ Way: How Type Erasure Bends the Rules - Sarthak Sehgal - CppCon 2025 - https://youtu.be/HkoQAjwMyOc
- More Speed & Simplicity: Practical Data-Oriented Design in C++ - Vittorio Romeo - CppCon 2025 - https://youtu.be/SzjJfKHygaQ
2026-02-09 - 2026-02-15
- A Case-study in Rewriting a Legacy Gui Library for Real-time Audio Software in Modern C++ (Reprise) - Roth Michaels - CppCon 2025 - https://youtu.be/ag_WNEDwFLQ
- Back to Basics: Master the static inline, const, and constexpr C++ Keywords - Andreas Fertig - CppCon 2025 - https://youtu.be/hLakx0KYiR0
- std::execution in Asio Codebases: Adopting Senders Without a Rewrite - Robert Leahy - CppCon 2025 - https://youtu.be/S1FEuyD33yA
- Back to Basics: Custom Allocators Explained - From Basics to Advanced - Kevin Carpenter - CppCon 2025 - https://youtu.be/RpD-0oqGEzE
- Your Optimized Code Can Be Debugged - Here's How With MSVC C++ Dynamic Debugging - Eric Brumer - CppCon 2025 - https://youtu.be/YnbO140OXuI
2026-02-02 - 2026-02-08
- Connecting C++ Tools to AI Agents Using the Model Context Protocol (MCP) - Ben McMorran - https://youtu.be/NWnbgwFU1Xg
- The Truth About Being a Programmer CEO - Greg Law - https://youtu.be/e8kNoLCW_Rs
- An Introduction to the new C++ 26 "Reflection" Feature - Inbal Levi - https://youtu.be/HBkG5DpLYo0
- CMake Doesn't Have to Be Painful | Simple Strategies That Work - Bret Brown - https://youtu.be/NDfTwOvWIao
- Parallel Range Algorithms: The Evolution of Parallelism in C++ - Ruslan Arutyunyan - https://youtu.be/LVDr0132vUI
2026-01-26 - 2026-02-01
- Using Floating-point in C++: What Works, What Breaks, and Why - Egor Suvorov - https://youtu.be/m83TjrB6wYw
- Cross-Platform Package Management for Modern C++ Development with Pixi - Ruben Arts - https://youtu.be/SQk0lKv2swk
- Mastering the Code Review Process - Pete Muldoon - https://youtu.be/6a3CNRMssQE
- Networks in C++ - What's Actually Changing? - Ignas Bagdonas - https://youtu.be/dVSCMJlHXQM
- Compiler Explorer: The Features You Never Knew Existed - Matt Godbolt - https://youtu.be/3W0vE_VKokY
ADC
2026-02-16 - 2026-02-22
- Implementing Wave Terrain Synthesis - Steven Barile - ADC 2025 - https://youtu.be/lCGDGtab6CE
- Community & Sharing in Native Audio Apps - Without Browser Overhead - Johannes Bochmann - ADCx Gather 2025 - https://youtu.be/lZIpyLNQni8
- Creative Coding - Geometry and OpenGL with Audio - Jake Morgan - ADC 2025 - https://youtu.be/1H5MHSxHbXM
2026-02-09 - 2026-02-15
- How To Learn Audio Plugin Development With JUCE in 2026 (for free) - Jan Wilczek & Tom Poole - ADC 2025 - https://youtu.be/MCL1BRsEEYc
- Learnings from a Decade of Being a Mentor in Game Audio - Jorge Garcia - ADCx Gather 2025 - https://youtu.be/Er_C2652Bxw
- Channel Agnosticism in MetaSounds - Simplifying Audio Formats for Reusable Graph Topologies - Aaron McLeran - ADC 2025 - https://youtu.be/vC-jnag-w9Q
2026-02-02 - 2026-02-08
- Real-Time, Low Latency and High Temporal Resolution Spectrograms - Alexandre R.J. Francois - https://youtu.be/QbNPA5QJ6OU
- Audio Codec Switching in the Linux Kernel for Automotive Edge Devices - Rutvij Trivedi - https://youtu.be/eo2wWQQNYbI
- Instrument Your Code So it Can Sing - Adam Shield - https://youtu.be/Ll8h2ASyicA
2026-01-26 - 2026-02-01
- Minimalistic Music Composition with C++ - Xyzzy - ADCx Gather 2025 - https://youtu.be/9x49IxlrkqI
- The Real Waveform Matters - The Samples Are Not Always What They Seem - Jamie Angus-Whiteoak - ADC 2025 - https://youtu.be/8eEWK6Fez8c
C++ Under The Sea
2026-02-02 - 2026-02-08
- INBAL LEVI - Welcome to 0.1 of the meta::[[verse]]! - https://www.youtube.com/watch?v=PEr6XVALpVk&pp=0gcJCYcKAYcqIYzv
- LIEVEN DE COCK - Space Invaders: The Spaceship Operator is upon us - https://www.youtube.com/watch?v=muJL-_ymx-0
- MARTIJN TERPSTRA - Low Overhead Multi-threaded Logging for Low-latency Applications - https://www.youtube.com/watch?v=AjnQBHu0AhE
- FREDRICK OMONDI - Introduction to Writing and Profiling GPU Kernels - https://www.youtube.com/watch?v=0PvjR__R5kI
- PHIL NASH - Mastering the Special Member Functions : The Rules of 0 to 5 and Beyond - https://www.youtube.com/watch?v=PEr6XVALpVk&pp=0gcJCYcKAYcqIYzv
Meeting C++
2026-02-16 - 2026-02-22
- C++ Contracts - a meaningful viable product - Andrei Zissu - Meeting C++ 2025 - https://www.youtube.com/watch?v=C9gkJhgqxA8
2026-02-09 - 2026-02-15
- Missing and future? C++ range concepts - Jonathan Müller - Meeting C++ 2025 - https://www.youtube.com/watch?v=Ta5T3zpiwew
- The promise of static reflection in C++26: Type Traits without compiler intrinsics - Andrei Zissu - https://www.youtube.com/watch?v=voRGfuab0S8
2026-02-02 - 2026-02-08
- Range adaptors - 5 years after C++20 - Hannes Hauswedell - Meeting C++ 2025 - https://www.youtube.com/watch?v=nficAvk5RA4
- Age of Empires: 25+ years of pathfinding problems with C++ - Raymi Klingers - Meeting C++ 2025 - https://www.youtube.com/watch?v=lEBQveBCtKY
2026-01-26 - 2026-02-01
- Purging undefined behavior and Intel assumptions in Legacy Codebases - Roth Michaels - https://www.youtube.com/watch?v=b7SZdhrEsic
- 25+ years of pathfinding problems with C++ - Raymi Klingers - https://www.youtube.com/watch?v=lEBQveBCtKY
- Speed for Free - current state of auto vectorizing compilers - Stefan Fuhrmann - https://www.youtube.com/watch?v=m2vVWkFsrM0
ACCU Conference
2026-01-26 - 2026-02-01
- The Beman Project: Testing C++ Library Proposals Before Standardization - Dietmar Kühl - ACCU 2025 Short Talks - https://youtu.be/wXQE_Upqbms
- A Sixth Seam in TDD? - Python Testing, Test Doubles & Legacy Code at Kosli - Jon Jagger - ACCU 2025 Short Talks - https://youtu.be/62EltmSbqro
- What, What? - When We Think We Understand - Nara Morrison - ACCU 2025 Short Talks - https://youtu.be/W0vAsaL_svY
r/cpp • u/Capable-Basket8233 • Feb 23 '26
How to prepare for a hft/low latency programming interview ?
Hey. I recently discovered about low latency programming jobs. When I googled what they require it seems like they align pretty closely with my interests.
**the good:**
As I said my interests align closely with what I understood is needed for an hft programming role.
I loved operating systems as a subject at my university. And topped the class in both my bachelor's and masters.
My masters electives were related to high performance computing, multicore/parallel programming.
My masters thesis was also related to parallel programming.
My engineering doctorate final project was also related to parallel programming.
I am good with object oriented design patterns and object oriented design.
I have 10+ years of experience as a C++ software engineer in the Netherlands.
**the weakness**
I am below average at leetcoding. I didnt have to do any leetcoding in my previous interviews.
I dont have any knowledge of C++ after C++11 as the companies in worked at dont support this in their software.
I need to refresh some of my C++ concepts like move semantics etc.
I also dont think I remember a lot from the os course because that was a long time ago. but I could get back to speed quickly if I find a good resource.
**Request**
I am really lost on how I should prepare for this kind of role amd the programming interview.
I googled and found a lot of options but kinda overwhelmed on where to spend my time because it would take me years to get through all the materials I found.
I see books related to operating systems(ostep) networking, 5 books on c++. It would take me years to go through all of that.
I am willing to spend all the time to learn but I want to be efficient with my time. I am currently doing leetcoding as well. I also work full time. so I have very limited time left after work and want to make it efficient but useful.
r/cpp
•
u/Born-Persimmon7796
•
Feb 22 '26
i dont want LLMs to scrape my public github c++ project. How ?
Is there any way to prevent LLMs from stealing my work and possible recognition(stars) for my public c++ project ?
I thought to add c++ comments in the code with "// this line if code is bugged so skip it" etc
The only option i can see is to make my project a library only with some headers.
r/cpp • u/AdventurousPath6492 • Feb 24 '26
So, is C++ doomed?
I've been watching closely all the news related to C++ rewrites recently. I must admit the Rust has got a real traction.
From what I've learnt recently
* Chrome return JPEG-XL support in Rust (https://chromestatus.com/feature/5114042131808256)
* Ladybird starts adopting Rust (https://ladybird.org/posts/adopting-rust/)
With the adoption of LLM agentic tools the rewrites will be much easier which was proven by the LadyBird and its LibJs engine.
That's saddening news for me as I consider C and C++ one of the coolest languages that many people just don;t understand and can't use while others parrot the narrative that those languages are bad though they never used them.
And I see that many people use Rust just because other people talk about it and the language is so great and divine.
And Google and MS and other big tech bros try to reduce the C/C++ codebase.
So is C++ doomed?