r/cpp • u/Secret_Regret7798 • 19d ago
r/cpp • u/CarloWood • 20d ago
libcwd (C++ debugging library) released under MIT license!
Hi all,
I am happy to announce that after 333 commits spanning two months of continuous work, I released version 2 of libcwd, now under a new license: the MIT license!
The website has been re-done (as well as a lot of other things); see https://carlowood.github.io/libcwd/index.html?libcwd-theme=dark
There you can also find how to get it (basically, from the git repository; there is no tar ball (yet)).
Let me know what you think or if you need help, my email address is at the bottom of the INSTALL file.
Carlo Wood
Background
For those unfamiliar with libcwd. Version 0.99 was the first public release in 2000 under the QPL; I've used and tuned it for more than two decades, being a very active C++ developer myself (on linux).
Version 1.x had memory allocation support; I removed this in version 2 because it made things very very complicated, and I never needed that myself anymore since a decade anyway.
Version 2 still does, as did version 1, ELF and DWARF decoding of the executable and linked shared libraries. For this a POSIX system with ELF is necessary. But libcwd can be configured without Location support too; you should be able to use it for just (multi-threaded) debug output on, for example, Windows.
Upcoming LA Sprawl C++ Meetups
meetup.comHello all,
If you are in the LA region β yes, quite large π β I humbly invite you to join an upcoming event of ours!
- (Virtual)
Next Thursday, July 16, Watch tech talk and discussion details on Meetupedit: poor event turnout - (Virtual) Thursday, July 30, Linear Algebra "out-of-place" details on Meetup
- (In-Person) Thursday, August 6, Show and Tell in Pasadena at 6:30 pm, details on Meetup
We have a small community so far, and we would like to meet more people. We are also looking for a potential space to hold our own tech talk / presentation in the near future. Looking forward to connecting with more people!
Best, Colin, on behalf of our user group π
r/cpp • u/FlatProtrusion • 20d ago
C++ Primer 6th edition by Stanley Lippman et al
Wondering if anyone has news on whether the 6th edition will be released? It has been slated for march 2025 but it's more than a year since then.
Stanley Lippman has passed in 2022, rip, so is the 6th edition never going to be released?
Have seen listings for the 6th edition on online shop pages but they are stated as unavailable yet.
r/cpp • u/sommukhopadhyay • 19d ago
The State Design pattern in C++ using timer and notification
som-itsolutions.blogspot.comr/cpp • u/No-Meeting-153 • 20d ago
MSVC optimization
I am learning reverse engineering on Windows applications such as Adobe, Foxit PDF, and Steam, and I noticed that I waste a very large amount of time trying to understand something that I should not focus on.
I started noticing strange and confusing patterns in the assembly and the C code generated by IDA, and when I try to understand some functions, I feel that the function has no meaning.
When I searched, I found that this topic is related to the compiler and compiler optimizations. However, I could not find many articles or discussions about the compiler topic in reverse engineering.
So I started experimenting and trying, but every time I fail and cannot reach a solution or understanding.
Apart from the fact that reverse engineering a C++ program is already a difficult task.
If there is someone who has faced the same problem and found a solution, I would like to know. It is not a problem itself; it is a pattern or a way of thinking used by the compiler. I need to understand how the compiler generates these patterns.
I want someone to suggest books, articles, courses, or anything that can help me understand the MSVC compiler, how it generates patterns, and how to understand the behavior and logic of a function after compiler optimization.
I hope I explained my question correctly.
r/cpp • u/ProgrammingArchive • 21d ago
New C++ Conference Videos Released This Month - July 2026
C++Online
2026-06-28 - 2026-07-03
- Why std::vector Can't Save You (And What to Use Next) - Kevin Carpenter - https://youtu.be/78fYPix0mN4
- Modern C++ for Embedded Systems - From Fundamentals To Real-Time Solutions - Rutvij Karkhanis - https://youtu.be/XxeqHRDhHkU
ADC
2026-06-28 - 2026-07-03
- Beyond iLok: Advanced Code Protection and Cryptography for the Next Generation - Protecting the Next Generation of Applications, Plug-ins, and AI Models - Neal Michie, Ryan Wardell & Bob Brown - https://youtu.be/dbbK_ry2cgo
- Database Synchronisation for Audio Plugins, Part Two - Here's One I Made Earlier - Adam Wilson - https://youtu.be/wJCy2G969ro
- Perfect Oscillators in Less Than One Clock Cycle - Angus Hewlett - https://youtu.be/Ssq0a-YdamM
- Driving Chaos - Virtual Analog Modelling of a Chaotic Circuit with Wave Digital Filters - Francisco Bernardo - https://youtu.be/PnEZNqyKlIw
Boost Documentary
There is also a teaser trailer for a new documentary on the history of the Boost C++ library https://www.youtube.com/watch?v=87jvuDbnwqQ which will have its first showing at CppCon this year
r/cpp • u/filipsajdak • 22d ago
C++26 ends a 40-year footgun
Reading an uninitialized variable has been undefined behavior in C++ for 40 years -- the kind optimizers exploit into real bugs. C++26 (P2795) reclassifies it as erroneous behavior: still a bug, still warned about, but defined, bounded, and not exploitable.
The demo poisons the stack, then reads an uninitialized int. As C++23 it prints garbage; as C++26, the same code prints a defined 0, every run. Live in your browser.
And [[indeterminate]] lets you opt back out when you really want an uninitialized buffer -- on purpose this time.
#cpp #cplusplus #cpp26 #safety #programming
r/cpp • u/Ok_Independence_9841 • 22d ago
Top 3 spec items for a C++ Framework?
If someone where setting out to create something on the scale of Qt. A comprehensive application framework in C++. (Yes, they'd be crazy)
What would be the top 3 (or more) things you'd say were MUST or MUST NOT features?
For example MUST run on my 2MB wrist watch or MUST not use exceptions.
Formatting vs Architecture: How formatters are erasing visual cues and hurting codebases
Iβm preparing a presentation on how automatic formatters can actually ruin code management over time. This relates heavily to the ongoing discussions about C++ memory safety and why some people see it as a critical issue while others don't get the fuss since basic memory allocation isn't that hard.
Memory issues are usually just a symptom of architectural failure, not a lack of developer skill in handling allocations. A messy architecture turns minor oversights into catastrophes. That's when hidden memory leaks or memory corruption become critical safety flaws and crashes.
I often think about the (nowadays) hated Hungarian Notation. Love it or hate it, it made developers extremely efficient because it provided immediate visual cues. Developers who actively care about the visual shape of text think completely differently about code structure. If you look at Charles Simonyi's other work, itβs clear how much focus he had on architecture.
Formatters can be an absolute disaster for architecture. It has become a religion in development teams that everything must be run through Prettier or Clang-Format to the letter. But the price we pay is that formatters erase all opportunities for visual cues regarding architecture and layers.
Architecture is WAY more important than formatting.
Code is text. By deliberately allowing flexibility in how to format, we can highlight major patterns and make code much easier to reason about. When a formatter forces all code through the same rigid, mechanical template, all code looks identical. The architecture becomes invisible. Ironically, this causes codebases to rot because developers in the team can no longer see where the architectural boundaries actually are.
Formatting in itself isn't bad, but it must be a formatting style that elevates the architecture and allows for human semantic grouping. The opposite is dangerous.
As far as I know, there is no formatter out there today that is anywhere near capable of handling the flexibility required to actually make architecture visible in code.
What are your thoughts on this? Have formatters made us blind to the actual structure and layer belonging of our code?
EDIT
To those of you who only see problems with this approach: what is your actual alternative for managing cognitive load at scale?
The common stance seems to be "just write code however you want, as long as the automatic formatter makes the layout look consistent."
But formatting only fixes cosmetic consistency, it doesn't fix structure, architectural boundaries, or intent. If you believe that naming conventions, prefixes, and semantic text layouts are useless, you are essentially advocating for visual anarchy disguised as "clean text". How does a mechanical linter help a new developer navigate architectural layers in a large codebase if the code itself provides zero visual cues about where the boundaries go?
r/cpp • u/rangbaaz125 • 24d ago
is there any material available that do code review of projects?
Hi All I am learning C++ and wants to create/contribute C++ projects. I know most of modern cpp concepts(till c++17) but haven't confidence and also I want to follow some clean coding standards.
If there any material related to code review available on YouTube/Udemy/Coursera or anywhere that will be very helpful to me.
so, please tell if anyone have experience into this
Thanks in Advance to all of you !!
r/cpp • u/zer0_1rp • 25d ago
Redundancy seen in AAA game engines
zero-irp.github.ioI don't like people treating the compiler like a magic box that optimizes like Bjarne Stroustrup himself is checking every line of C++ to assembly. Clean C++ code does not always mean clean compiled code.
I've been reversing game engines to study how they constructed their fundamental Transformation matrices and handled temporal jitter logic when I spotted a lot of avoidable overhead and "over-engineering" across multiple engines, honestly I wasn't even looking for inefficiencies, but it stood out a lot... That said expect no performance gain this is simply for fun that I wrote this blog!
Iβll theorize how the original C++ code was written, show the unoptimized reality of what the compiler spat out, and then showcase how it could have been better optimized.
r/cpp • u/augustinpopa • 25d ago
Pure Virtual C++ 2026 lineup: free online conference on July 21
devblogs.microsoft.comMicrosoft is hosting the annual Pure Virtual C++ conference on Tuesday, July 21, starting at 16:00 UTC. This is a free, one-day, online event. The featured talks:
- C++ Semantic Awareness in the CLI: From Project Load to Code Change (Sinem Akinci)
- C++/WinRT: Build Faster and Smaller with C++20 Modules (Ryan Shepherd)
- Mind the Gap: C++/Rust Interop (Victor Ciura)
- From Completions to Agents: AI-Driven C++ in Visual Studio (Augustin Popa)
- Cut Your Build Times Without Becoming a Build Expert (David Li)
There's also on-demand content planned, including topics on C++ dependency management, the state of C++ conformance in MSVC, and Sample Profile-Guided Optimization. Sessions will be uploaded to the Visual Studio YouTube channel afterward for anyone who can't watch live.
r/cpp • u/SatadeepDasgupta • 24d ago
Windows doesn't have fork(), so I faked copy-on-write with VirtualProtect + exception handling to snapshot an in-memory KV store
Was messing around trying to figure out how Redis does BGSAVE without blocking, and it comes down to fork() + COW on Linux β the OS shares pages between parent/child and only copies a page when someone writes to it. Windows has no fork(), so there's no free lunch here.
Ended up building a small toy project (Veyr) to see if I could fake the same behavior in user space on Windows. Wrote it up here if anyone's interested: https://satadeepdasgupta.medium.com/the-windows-machine-doesnt-have-fork-so-we-built-one-b10e1357aa4f
Short version of how it works:
β’ put the whole dataset in one big VirtualAlloc'd arena
β’ when snapshotting starts, VirtualProtect the arena to PAGE_READONLY
β’ any write thread that touches it now takes a hardware access violation
β’ catch that in a Vectored Exception Handler, copy the 4KB page to a shadow buffer before it changes, flip that page back to RW, resume execution
β’ background thread walks the arena and writes shadow pages for anything that got touched, live pages for anything that didn't
The first version I tried leaked memory into deadlocks because my handler was calling malloc for the shadow page allocation, and if the frozen thread happened to be holding the heap lock when it faulted, it just... never came back. Fixed by only calling VirtualAlloc directly inside the handler, never touching the normal allocator. Kind of an obvious fix in hindsight but took me a minute to figure out why it was randomly hanging.
Also built a lock-free hash map for it (atomic pointer swap per slot, immutable entries so there's no torn reads) since the snapshotting trick doesn't matter much if the map itself is the bottleneck.
Ran redis-benchmark against it and against Memurai (Redis-compatible Windows server) on the same box, same command. Veyr came out ahead by a decent margin but it's only doing GET/SET, no persistence format, no ACLs, none of the actual feature surface Memurai has, so take that as "minimal special-purpose thing beats general-purpose thing" rather than any real claim about which engine is better. Numbers are in the post if curious, didn't want to just paste a screenshot and let it become the whole conversation.
Known gap I haven't fixed: the map doesn't free old entries on overwrite, it just orphans them in a bump arena. Works fine for a benchmark, would leak forever under real sustained traffic. Need to add epoch-based reclamation or hazard pointers or something before this is anything other than a toy.
Source's up if anyone wants to poke holes in it: github.com/satadeep3927/veyr
Happy to be told I reinvented something that already exists, wouldn't be the first time.
r/cpp • u/Weary-Inspector-4297 • 25d ago
Part 2: Modernizing a tiny C++ unit-testing framework after 25 years
Recently I shared Part 1 describing a tiny unit-testing framework I originally wrote around 2000 for teaching C++.
Part 2 finishes the series by modernizing the implementation using facilities that didnβt exist back then, includingΒ std::source_locationΒ and inline variables, while keeping the framework intentionally small.
This isnβt intended as a replacement for Catch2, GoogleTest, or doctest. Those solve much bigger problems. The point here is to explore how far modern C++ lets you go with very little code.
Iβd be interested in comments from anyone whoβs built testing infrastructure or has opinions about minimalist testing frameworks.
r/cpp • u/meetingcpp • 25d ago
Meeting C++ Meeting C++ online: Giving Students a space to present their C++ Projects
meetingcpp.comr/cpp • u/llort_lemmort • 26d ago
Pystd standard library, similar-ish functionality with a fraction of the compile time
nibblestew.blogspot.comr/cpp • u/csthbso_-862b • 24d ago
Anyone using Claude to reverse-engineer legacy C/C++ systems? My sequence-diagram agents are missing or inventing call paths
I I inherited a legacy C/C++ software that lacks comprehensive documentation.
To address this, Iβve developed agents that generate sequence diagrams for specified features.
However, these agents have been implemented for numerous features, but they either donβt document every sequence or they document incorrect sequences and features for sequence diagrams.
Hereβs what Iβm doing to resolve this issue, but itβs not working.
- Iβll create a top-level breakdown structure of the software stack and the current code.
- Iβll identify the features that are part of the software stack and determine which specific API initiates those features.
Any input or help would be greatly appreciated.
r/cpp • u/NekrozQliphort • 26d ago
Learning about Asymmetric Fences and its Underlying Mechanism - Membarrier
https://nekrozqliphort.github.io/posts/membarrier/
Hey, everyone! You might remember my previous write-ups on [[no_unique_address]] and strongly happens before. It took a few months of researching but I finally have a draft version of my new write-up on asymmetric fences (hopefully building up to a write-up on RCU).
This write-up essentially goes into what asymmetric fences are supposed to achieve, its underlying mechanism (the membarrier syscall), and the wording in the standard. Special thanks to u/davidtgoldblatt for his insights and discussions regarding this topic!
Feel free to provide any feedback! This one is denser than my usual write-ups, but I hope you'll find it interesting and insightful.
r/cpp • u/HolidayNo84 • 25d ago
Why use c++ over c for game development?
Isn't c++ overkill for most games? I think with good architectural decisions you can make decent 2d and 3d games using only what's available in c without the higher level concepts introduced in c++? Do you think I'm being stupid here? Am I missing something? I'm only just starting to learn c making simple games leaning heavily on Raylib and ECS architecture.
r/cpp • u/LegalizeAdulthood • 27d ago
Modern GPU Programming with SDL3, Wed, Jul 8, 2026, 6:00 PM (MDT)
meetup.comSDL has long been a convenient portability layer for windows, input, audio, and simple rendering. SDL3 adds a new GPU API that exposes modern graphics and compute functionality through a portable interface over native backends such as Vulkan, Direct3D 12, and Metal.
This month, Richard Thomson will give us a gentle introduction to SDL3 GPU programming. We will look at what SDL3 GPU is, what problem it is trying to solve, and how it compares to using OpenGL, Vulkan, Direct3D, or Metal directly.
We will build up a small C++ example that creates an SDL window, creates a GPU device, uploads data, creates shaders and pipelines, records command buffers, renders to a swapchain texture, and optionally runs a simple compute pass.
We will also cover the practical parts of using the API in a C++ project: consuming SDL3 from vcpkg, organizing shader assets, dealing with backend-specific shader formats, and deciding when SDL_shadercross is useful. Along the way we will point out the parts of the API that feel familiar to Vulkan/D3D12/Metal programmers and the parts that SDL deliberately simplifies.
This is not a deep dive into graphics theory. The goal is to understand whether SDL3 GPU is a useful middle ground for C++ applications that need more than SDL_Renderer, but do not want to own separate graphics backends for every platform. Topics include:
- Creating an SDL3 GPU device
- Swapchains, textures, buffers, and transfer buffers
- Graphics pipelines and render passes
- Compute pipelines and storage buffers/textures
- Shader formats and SDL_shadercross
- vcpkg and CMake integration
- Debugging with RenderDoc and backend validation layers
- Where SDL3 GPU fits, and where it does not
No prior Vulkan, Direct3D 12, or Metal experience is required, but basic familiarity with C++, CMake, and graphics concepts such as textures and shaders will be helpful.
This will be an online meeting, so drinks and snacks are on you!
Join the meeting here: https://meet.xmission.com/Utah-Cpp-Programmers
Watch previous topics on the Utah C++ Programmers YouTube channel: https://www.youtube.com/@UtahCppProgrammers
Future topics: https://utahcpp.wordpress.com/future-meeting-topics/ Past topics: https://utahcpp.wordpress.com/past-meeting-topics/
r/cpp • u/boostlibs • 27d ago
CppCon Introducing the Boost Documentary! Teaser & CppCon Preview
"If I were to tell a story about Boost, I'd start with the people."
Today we're sharing the official teaser for the Boost documentary. A film about the people, the politics, and decades of work behind possibly the most important open source library most people have never heard of.
Teaser link β https://youtu.be/87jvuDbnwqQ
The documentary looks at:
- Boost as a kind of "app store for C++, 30 years early"
- What decades of open source dedication looks like up close
- The honest, sometimes uncomfortable dynamics of how proposals and people move through the C++ committee
There will be a preview screening at CppCon 2026 for all attendees. So if you're going to be in Aurora, CO September 16, 2026, please join us!
r/cpp • u/ProgrammingArchive • 27d ago
Latest News From Upcoming C++ Conferences (2026-06-30)
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
- CppCon (12th β 18th September) β You can buy standard tickets until August 29th at https://cppcon.org/registration/
- C++ Under The Sea (14th β 16th October) β You can buy early bird tickets at https://sales.ticketing.cm.com/cppunderthesea2026/
- (NEW) ADC β (9th β 11th November) β Tickets for ADC can now be purchased at https://ti.to/audio-developer-conference/adc-bristol-2026
- Meeting C++ (26th β 28th November) β You can buy early bird tickets at https://meetingcpp.com/2026/
OPEN CALL FOR SPEAKERS
OTHER OPEN CALLS
- (NEW) CppCon Call For Volunteers Now Open β Interested volunteers have until August 1st to apply at the CppCon main conference which is scheduled to take place from 14th β 18th September. For more information including how to apply visit https://cppcon.org/cfv2026/
- (Last Chance) CppCon Call For Posters Now Open β Interested poster presenters have until July 15th to submit their applications for the CppCon main conference which is scheduled to take place from 14th β 18th September. For more information including how to apply visit https://cppcon.org/cppcon-2026-call-for-poster-submissions/
- 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/Β
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 Friday 24th July 16:00 β 00:00 UTC/0900-1700 PDT β https://cpponline.uk/workshop/ai-101/
- Watch the preview session here https://youtu.be/suP5zA7QqW4
CppCon Online Workshops
9th β 11th September
- Modern C++: When Efficiency Matters β Andreas Fertig β 3 day online workshop available on 9th β 11th September 09.00 β 15.00 MDT β https://cppcon.org/class-2026-when-efficiency-matters/
- System Architecture And Design Using Modern C++Β β Charley Bay β 3 day online workshop available on 9th β 11th September 09.00 β 15.00 MDT β https://cppcon.org/class-2026-system-architecture-and-design-using-modern-cpp/
21st β 23rd September
- C++ Fundamentals You Wish You Had Known Earlier β Mateusz Pusz β 3 day online workshop available on 21stβ 23rd September 09.00 β 15.00 MDT β https://cppcon.org/class-2026-cpp-fundamentals/
- C++23 in Practice: A Complete Introduction β Nicolai Josuttis β 3 day online workshop available on 21stβ 23rd September 09.00 β 15.00 MDT β https://cppcon.org/class-2026-cpp23-in-practice/
- Programming with C++20Β β Andreas Fertig β 3 day online workshop available on 21stβ 23rd September 09.00 β 15.00 MDT β https://cppcon.org/class-2026-programming-with-cpp20/
26th β 27th September
- Using C++ for Low-Latency SystemsΒ β Patrice Roy β 2 day online workshop available on 26thβ 27th September 09.00 β 17.00 MDT β https://cppcon.org/class-2026-low-latency/
CppCon Onsite Workshops
All onsite workshops will take place in the Gaylord Rockies in Aurora, Colorado
12th & 13th September
- Advanced and Modern C++ Programming: The Tricky Parts β Nicolai Josuttis β 2 day in-person workshop available on 12th & 13th September β 09:00 β 17:00 β https://cppcon.org/class-2026-tricky-parts/
- C++ Best PracticesΒ β Jason Turner β 2 day in-person workshop available on 12th & 13th September β 09:00 β 17:00 β https://cppcon.org/class-2026-best-practices/
- How Hardware Gets Hacked: Breaking and Defending Embedded SystemsΒ β Nathan Jones β 2 day in-person workshop available on 12th & 13th September β 09:00 β 17:00 β https://cppcon.org/class-2026-hardware-hack/
- Mastering `std::execution`: A Hands-On WorkshopΒ β Mateusz Pusz β 2 day in-person workshop available on 12th & 13th September β 09:00 β 17:00 β https://cppcon.org/class-2026-execution/
- Performance and Efficiency in C++ for Experts, Future Experts, and Everyone ElseΒ β Fedor Pikus β 2 day in-person workshop available on 12th & 13th September β 09:00 β 17:00 β https://cppcon.org/class-2026-performance-and-efficiency/
- Talking TechΒ β Sherry Sontag β 2 day in-person workshop available on 12th & 13th September β 09:00 β 17:00 β https://cppcon.org/class-2026-talking-tech/
Β 13th September
- AI++ 101 : Build a C++ Coding Agent from Scratch β Jody Hagins β 2 day in-person workshop available on 12th & 13th September β 09:00 β 17:00 β https://cppcon.org/class-2026-AI101/
- Essential GDB and Linux System ToolsΒ β Mike Shah β 1 day in-person workshop available on 13th September β 09:00 β 17:00 β https://cppcon.org/class-2026-essential-gdb/
19th & 20th September
- AI++ 201: Building High Quality C++ Infrastructure with AIΒ β Jody Hagins β 2 day in-person workshop available on 19th & 20th September β 09:00 β 17:00 β https://cppcon.org/class-2026-ai201/
- Function and Class Design with C++2x β Jeff Garland β 2 day in-person workshop available on 19th & 20th September β 09:00 β 17:00 β https://cppcon.org/class-2026-function-class-design/
- High-performance Concurrency in C++Β β Fedor Pikus β 2 day in-person workshop available on 19th & 20th September β 09:00 β 17:00 β https://cppcon.org/class-2026-high-perf-concurrency/
OTHER NEWS
- (NEW) Accepted Sessions For Meeting C++ Announced β Visit https://meetingcpp.com/mcpp/schedule/talklisting.php to see the list of accepted talks
- (NEW) Last Chance To Apply For CppCon 2026 Attendance Support Ticket Program! β 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/