C++ - Reddit
228 subscribers
48 photos
8 videos
25.3K links
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
Download Telegram
What do you think do I need continue learning cpp

Actually it's more about what would we need for cpp to be more popular

I personally think cpp is great language even thought I am getting bullied by compiler every single time or does my code classified as harassment/battery offence to compiler or only to human race whatever python backend doesn't know the greatness of real program language

Note: I started to learn cpp for unreal engine 5

and now unreal engine 6 will be ai slop with new useless "safe" language vers in this case does it looks similar to rust

Seriously zig rust possibly java okay even java knows it's bad it used for virtual machine versatility , ease of use

..

I am shiting you for universities and for Minecraft mods that's all

All of those languages tries to be better c or cpp but we still code in c and cpp

This why we need features to existing languages

From least controversial to most

0.1 delete lua I tried to make mods on it this NOT better python and I will not stand this lil timmi propaganda

1. Add saf++ library so idea is to make this library collection of safe analogies to unsafe instructions etc

2. Make "elegant" template errors readable without llm yes I have skill issue yes I am python dev at least I am not bibe coder I use ai to learn because I am not 10x guy I started learning python in 2020\~2021 so I am new to coding even newer to cpp 2026 I don't have reputation to vibe code I am not worthy of it and maybe you too

3 cpp needs debloat now because we can't focus on what important if we have to much to review we don't need 3 if I remember correctly copys of copys we don't need lua.. we don't need to have 5 different instructions to do one thing

One thing if you think I am wrong go programe python true I am bad at programing and I am new but two is important I will try to improve not only as a programer as a person and please if somebody didn't create compiler from cpp to lua I will do it myself on cpp

https://redd.it/1uz89ve
@r_cpp
I really reconsider my life choices when I have to deal tooling bugs.

I like writing useful stuff, I'm tired of fighting tooling, I can legit say %80 percent of my time goes to dealing with dependencies build systems etc. Very rarely I have the privilege of actually writing stuff.

This shit sucks, like it really sucks. I hate it.

Is this normal, or only people who have it easy are web Devs and Java Devs since they are in a sandboxes environment and don't have deployment problems.

Am I crazy or is this common?

https://redd.it/1uzd6kw
@r_cpp
Lifetime safety and invalidation without a borrow-checker: using type system analysis to get rid of many potentially invalidation cases WITHOUT annotations.
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4296r0.pdf

https://redd.it/1uzmxw9
@r_cpp
A set of papers related to safety in July mailing list.

Since this is a topic that is interesting to many (including myself), I checked what the July mailing list has relevant to the safety topic and collected here what I found more relevant:

- A framework to systematically classify UB: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3100r7.pdf

- core_ub: a run-time profile to guarantee lack of UB: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4317r0.pdf

- an initialization profile. This profile tries to give a guaranteed set of guaranteed initialization rules, banning impossible to analyze ones, statically: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4222r1.pdf


- deny by default + positive rules: a framework for invalidation detection with fewer annotations. This one is more of research than some of the other papers INHO right now, but looks interesting. Its main insight is that by adding deny by default combined with UB classification + as a default deny rule and a second layer of positive rules, combined with strict aliasing, annotations can be reduced to detect a subset of safety: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4296r0.pdf

- subsetting: banning unsafe constructs and usages through annotations to make the language safer by default. Collections of such rules could yield some specific profile or subset of profiles: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3716r1.html

- on activating profiles proposes what the semantics of activating a profile should or should not be: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4314r0.html

- implicit contract assertions and profiles: this paper, among others, argues whether the base vehicle for implicit contract assertions should be a language feature or just a profile and explains that point of view in the matter: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4306r0.pdf

The papers related to pure contracts were intentionally left out since there are so many, but some are tangentially or directly related to the topic of safety.

Part of these papers lean on other foundational papers, such as yheprofiles framework (not from July mailing itself): https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3589r2.pdf

I hope you enjoy it!


https://redd.it/1v0hynk
@r_cpp
Euro LLVM 2026: All talks related to C++ security

The recent Euro LLVM conference has several talks related to clang improvements that are either recent, in the process of eventually be pushed into upstream, or still in research status:

- Extending Lifetime Safety: Verification of [[clang::noescape] annotation](https://youtu.be/9Wcc7phM6kE?si=88ZZt6Gtj1zImMj)
- [Adding Nullability Checking and Annotations to Many Millions of Lines of Code](
https://youtu.be/KzIRpQgRE0M?si=gZ1fnf7VHX5EeqNk)
- [Bounds Checking with the Clang Static Analyzer: Improvements and Insights](
https://youtu.be/QisZYmCW9Rc?si=iUSuU5jSrnNaNQm)
- Finding Injection Vulnerabilities: Improvements of the Taint Analysis of the Clang static analyzer
- Capabilities Great and Small: CHERI, CHERIoT, and LLVM

All in all, a good overview of what clang can actually do today, with annotations as well, and what is being envisioned on the various security discussions.

https://redd.it/1v0ut9j
@r_cpp
I've invented labeled loop breaks

And now I don't believe it wasn't invented before, but I can't find any info on it. How long ago was it invented? Why isn't it used widely or even mentioned anywhere? What are the downsides?
Here's the main idea:

// Keyword - for, while, or do
// Tag - custom loop name
// ... - loop body
#define looptag(keyword, tag, ...)\
keyword(VA
ARGS)\
if(false)\
{\
tag##break: break;\
tag#
#continue: continue;\
}\
else\
/Here goes your loop body/

Here is the playground

https://redd.it/1v0s5da
@r_cpp
Looking for ideas for the next version of my low-latency C++ project



**Planning the next version of my low-latency C++ project**

A few weeks ago I shared my C++20 low-latency trading project, **Pulse-Order**, GitHub: [https://github.com/Shivfun99/Pulse-Order](https://github.com/Shivfun99/Pulse-Order) and I was genuinely surprised by the response. Thanks to everyone who took the time to review the project, challenge my design decisions, and explain trade-offs from real low-latency systems. Those discussions helped me identify several areas where the project can be improved.

**Original post:**
[https://www.reddit.com/r/quantindia/s/u45s60B33Q](https://www.reddit.com/r/quantindia/s/u45s60B33Q)

[https://www.reddit.com/r/quant/s/IHKVkv0UGv](https://www.reddit.com/r/quant/s/IHKVkv0UGv)

The current version includes:

* Binary market data parsing
* L2 OB
* Risk checks
* DPDK packet processing
* Application-side latency benchmarking

I'm now starting work on the next version.

Some areas I'm considering are:

* Lock-free multi-core architecture
* Multi-symbol order books
* Real market data replay
* Hardware timestamping
* AF\_XDP vs DPDK
* Exchange gateway simulation
* Order lifecycle (new/modify/cancel/fills)
* Tail-latency analysis under burst traffic

For those who have worked on low-latency systems or exchange infrastructure, **which of these would you tackle first? Is there an important systems component that you think should be added before anything else?**

I'm mainly interested in improving the systems engineering aspects rather than the trading strategy itself.

https://redd.it/1v11g3n
@r_cpp
C++ 20 named modules with clang-cl is finally added in CMake 4.4

I've been using named modules in my hobby C++ projects for years but they always trigger some unexpected ICEs when I used MSVC, and I got really tired of experimenting workarounds. After I switched to clang-cl recently, all the related problems I've encountered so far were resolved. The only thing missing now is import std

https://redd.it/1v1hq9a
@r_cpp
New C++ Conference Videos Released This Month - July 2026 (Updated to Include Videos Released 2026-07-13 - 2026-07-19)

**C++Now**

2026-07-13 - 2026-07-19

* Keynote: Benchmarking - It's About Time - Matt Godbolt - [https://youtu.be/EU\_nQh8wg5A](https://youtu.be/EU_nQh8wg5A)
* The Morning Briefing - C++ Concurrency Before the Hardware Reckoning - Fedor Pikus - [https://youtu.be/WtChBezurj8](https://youtu.be/WtChBezurj8)
* Lock-free Programming is Dead - Long Live Lock-free Programming! - Fedor G Pikus - [https://youtu.be/UdKqfQ3a\_sY](https://youtu.be/UdKqfQ3a_sY)

2026-07-06- 2026-07-12

* Keynote: Reflection Is Only Half the Story - Barry Revzin - [https://youtu.be/DZTkT1Cq\_aY](https://youtu.be/DZTkT1Cq_aY)
* Keynote: Multidimensional Parallel Standard C++ - Mark Hoemmen - [https://youtu.be/VAwW\_s1uEHY](https://youtu.be/VAwW_s1uEHY)

**C++Online**

2026-07-13 - 2026-07-19

* C++ Contracts - A Meaningfully Viable Product, Part II - Andrei Zissu - [https://youtu.be/1VUqOx6PCMU](https://youtu.be/1VUqOx6PCMU)
* Sanitize it Before You Ship IT - Vishnu Nath - [https://youtu.be/jzcGATR78Mk](https://youtu.be/jzcGATR78Mk)

2026-07-06 - 2026-07-12

* Time to Introspect - A Beginner's Guide to Practical Reflection - Sarthak Sehgal - [https://youtu.be/9stn1o149pw](https://youtu.be/9stn1o149pw)
* Refactoring Towards Structured Concurrency - Roi Barkan - [https://youtu.be/6502xFEreI8](https://youtu.be/6502xFEreI8)

2026-06-29 - 2026-07-05

* Why std::vector Can't Save You (And What to Use Next) - Kevin Carpenter - [https://youtu.be/78fYPix0mN4](https://youtu.be/78fYPix0mN4)
* Modern C++ for Embedded Systems - From Fundamentals To Real-Time Solutions - Rutvij Karkhanis - [https://youtu.be/XxeqHRDhHkU](https://youtu.be/XxeqHRDhHkU)

**ADC**

2026-07-13 - 2026-07-19

* Building Inclusive Audio Tools - Accessibility with ARIA, WCAG, and Real-World Projects - Samuel John Prouse & David Shervill - [https://youtu.be/O5xX9a7P-SU](https://youtu.be/O5xX9a7P-SU)
* PSD to DAW - Building a Pixel-Perfect UI Pipeline - Bence Kovács - [https://youtu.be/hebLkAR5X3I](https://youtu.be/hebLkAR5X3I)
* Analog Filters for Realtime Audio - George Gkountouras - [https://youtu.be/NLt0NqUtNLo](https://youtu.be/NLt0NqUtNLo)
* A History of FLAC - The Free Lossless Audio Codec - Josh Coalson - [https://youtu.be/tBb1STRW56s](https://youtu.be/tBb1STRW56s)

2026-07-06 - 2026-07-12

* Workshop: Audio Plugin DSP in Practice - Jan Wilczek & Linus Corneliusson - [https://youtu.be/Atc0GRWoolI](https://youtu.be/Atc0GRWoolI)
* An Open Toolkit for Real-Time Audio Descriptors - Valerio Orlandini - [https://youtu.be/HKlnn0hd8J0](https://youtu.be/HKlnn0hd8J0)
* Bugs I’ve Seen in the Wild - From Confusion to Amazement - Olivier Petit - [https://youtu.be/LBWtb\_uXt0I](https://youtu.be/LBWtb_uXt0I)
* Real-Time Audio in Python: Introducing the asmu Package - Felix Huber - [https://youtu.be/X2vr81CJ934](https://youtu.be/X2vr81CJ934)

2026-06-29 - 2026-07-05

* 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](https://youtu.be/dbbK_ry2cgo)
* Database Synchronisation for Audio Plugins, Part Two - Here's One I Made Earlier - Adam Wilson - [https://youtu.be/wJCy2G969ro](https://youtu.be/wJCy2G969ro)
* Perfect Oscillators in Less Than One Clock Cycle - Angus Hewlett - [https://youtu.be/Ssq0a-YdamM](https://youtu.be/Ssq0a-YdamM)
* Driving Chaos - Virtual Analog Modelling of a Chaotic Circuit with Wave Digital Filters - Francisco Bernardo - [https://youtu.be/PnEZNqyKlIw](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](https://www.youtube.com/watch?v=87jvuDbnwqQ) which will have its first showing at CppCon this year

https://redd.it/1v1p3nc
@r_cpp
Good web site/GitHub repo for practice

Hi everyone,

I'm looking for one good web site with coding exercises for practice c++.

Ofc I know that Leetcode/Codeforces is good but I'm looking for web sites where I can practice all topics of c++ from OOP to concurrent and parallel programming.

Good thing will be if you know for some sites where you get code snippet and then need to predict output/what is error.

https://redd.it/1v2idr3
@r_cpp
Is there something like a VM to wrap tools such as LLVM IRBuilder?

I'm working on a lightweight embedded scripting language for C++ applications. This is intended for modest extensions to the applications themselves, such as adding context-menu options to GUI controls (scripts are handlers for when the option is activated); parsers for loading data in custom serialization formats (scripts might be pairs of regex rules with match callbacks); or statistical analyses for data sets. The language has a VM which aims to be almost trivial, or at least have a minimal working core -- mostly instructions to build up a parameter list and call C++ code via function pointers. One of my goals is to minimize the distinction between calling C++ functions from a host application versus methods that implement basic language elements, like declaring/initializing variables, managing lexical scopes and variable lifetimes, and branching/loop blocks. For instance, instead of "jump" instructions if/else could be implemented as a C++ function whose second argument is an object encapsulating a code block.

My question is as follows: with this setup I am researching the feasibility of transpiling to C++ files rather than executing scripts immediately. For the basic language I seek to minimize heavy dependencies like LLVM (leaning more toward a much smaller infrastructure, like LuaVM). But I would accept external dependencies for optional extensions.

Generating C++ code directly via something like std::stringstream seems pretty awkward. I've read about Jank's IR from which C++ code is produced (and then, I believe, compiled immediately via Clang). Perhaps Gabriel dos Reis's IPR could be used to similar effect. Instead of compiling \*to\* IR, generate IR and decompile to C++ source code.

But since my compiler pipeline is designed to emit VM code, I'm hoping some tools might exist for which IR is more akin to instructions in some special-purpose bytecode format. Functionally, I'm envisioning something like LLVM IRBuilder, where code-generation is decomposed into lots of small actions (add some token to an argument list, open/close some code block, etc.). Even just a wrapper around IRBuilder might work. But what I hope to find is a sort of DSL where various IRBuilder methods (or the equivalent) could be written in sequence, one-line-per-instruction style. One thing confusing me is that online discussions about .ll files "decompiling" to C++ aren't clear as to whether the goal is generating IRBuilder code that would produce the equivalent .ll code, or conversely reconstructing the actual C++ originally written. Substantially though I'm not sure how much it matters. Here's what AI spits out as a simple IRBuilder example:

Type* Int32Ty = Type::getInt32Ty(Context);
std::vector<Type*> ParamTypes = {Int32Ty, Int32Ty};
FunctionType *FuncType = FunctionType::get(Int32Ty, ParamTypes, false);
Function *AddFunc = Function::Create(FuncType, Function::ExternalLinkage, "add", OwnerModule.get());
Function::arg_iterator Args = AddFunc->arg_begin();
Value* ArgA = Args++;
ArgA->setName("a");
Value* ArgB = Args;
ArgB->setName("b");

I could certainly envision an interface like this to produce equivalent C++ code:

int32_t add(int32_t a, int32_t b)

and so forth. But it would be excellent if the IRBuilder code could be replaced by something more VM-like:

init-arg-list
add-param-type @Int32Ty
add-param-type @Int32Ty
add-return-type @Int32Ty
reset-arg-cursor
set-arg-name "a"
inc-arg-cursor
set-arg-name "b"
inc-arg-cursor
set-proc-name "add"
write-function-signature

or something like that (imagining a "@" sigil on type names). The point is that the above lines might be pretty close to VM code intended to call the "add" function at runtime, so you could use the same compiler toolchain for multiple steps before generating one kind of code for runtime scripts and a different VM flavor for producing C++ source files.

I don't think there's any
boost::int128 review starts today (July 22 - July 31)

Announced officially on the [Boost mailing list](https://lists.boost.org/archives/list/[email protected]/thread/GLZALH3WRHSICP6ZYOFDOPWUQTJUKOM5/)

**Introduction**

The formal review of Matt Borland's `boost::int128` for inclusion in the Boost libraries, starts today.

Int128 is a portable C++14 implementation of signed and unsigned 128-bit integers. It has no dependencies, is header-only, and can be consumed as a module in C++20. It serves as a practical solution to the partial (resp. absent) support of 128-bit integers by gcc/clang (resp. msvc), and as a lightweight alternative to heavier projects.

You can find the library and its documentation here:
\- [https://github.com/cppalliance/int128/tree/boost\_review](https://github.com/cppalliance/int128/tree/boost_review)
\- [https://develop.int128.cpp.al/overview.html](https://develop.int128.cpp.al/overview.html)
\- Compiler Explorer: [https://godbolt.org/z/5aM6K9b4r](https://godbolt.org/z/5aM6K9b4r)

Although possibly not faithful to Matt's implementation, this CE link will be handy if you are in a rush but want to play with the library.

Anyone is welcome to post a review and/or take part in subsequent discussions in the mailing list.

**Review guidelines**

Please provide feedback on the following general topics:

* What is your evaluation of the design?
* What is your evaluation of the implementation?
* What is your evaluation of the documentation?
* What is your evaluation of the potential usefulness of the library?
* Did you try to use the library? With which compiler(s)? Did you have any problems?
* How much effort did you put into your evaluation? A glance? A quick reading? In-depth study?
* Are you knowledgeable about the problem domain?

Ensure to explicitly include with your review: ACCEPT, REJECT, or CONDITIONAL ACCEPT (with acceptance conditions).

Thank you for your time making our OSS ecosystem better. Happy to start the discussions!

Arnaud Becheler (Review Manager)

https://redd.it/1v3duby
@r_cpp