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/According_Leopard_80 • Feb 28 '26
Writing 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
r/cpp • u/KeyAlbatross6044 • Feb 27 '26
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
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
In 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
r/cpp • u/ProgrammingArchive • Feb 26 '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)
OPEN CALL FOR SPEAKERS
OTHER OPEN CALLS
C++Online
Call For Open Content (Last Chance) – Get a FREE ticket to C++Online 2026 by…
C++Now
TRAINING COURSES AVAILABLE FOR PURCHASE
Conferences are offering the following training courses:
C++Online
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
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
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
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
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
LLVM 22 was released, update your toolchains!
r/cpp • u/oleksandrkvl • Feb 24 '26
The 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
Jason 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
r/cpp • u/ProgrammingArchive • Feb 23 '26
CppCon
2026-02-16 - 2026-02-22
2026-02-09 - 2026-02-15
2026-02-02 - 2026-02-08
2026-01-26 - 2026-02-01
ADC
2026-02-16 - 2026-02-22
2026-02-09 - 2026-02-15
2026-02-02 - 2026-02-08
2026-01-26 - 2026-02-01
C++ Under The Sea
2026-02-02 - 2026-02-08
Meeting C++
2026-02-16 - 2026-02-22
2026-02-09 - 2026-02-15
2026-02-02 - 2026-02-08
2026-01-26 - 2026-02-01
ACCU Conference
2026-01-26 - 2026-02-01
r/cpp • u/Capable-Basket8233 • Feb 23 '26
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
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
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?
TLDR: I am trying to create what I could refer to as a lightweight task manager for GPU cloud systems but in a simulated environment.
I need to be able to create and decide scheduling policies for the workloads I will assign to the system. I also need to be able to monitor GPU processes as well as VRAM usage for each of the given workloads, and the software needs to be able to act as admission control so I can prevent Out-of-memory errors by throttling workloads which are intensive.
Essentially, I am trying to make something that simulates NVIDIA MIG and uses NVIDIA SMI or any other process to monitor these in a simulated environment. ( I do not possess a graphics card with NVIDIA MIG capabilities, but it has NVIDIA SMI )
So far the resources I have to put something like this together is
Considering this is a lightweight application and only meant to demonstrate the elements that go into consideration when making GPU-accelerated systems are there any librarie,s articles or books that would be helpful in making this feasible?
Also considering I am not so experienced in C++ is this a feasible project or is it better to stick with python? I am fully open to learning what is needed but I am on a time constraint of about 3 months give or take.
P.S I have gone through the theoretical aspect and about 30+ articles and papers on the theory issues and problems. I just need practical pointers to libraries, tools and code that would help in the actual building.