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
An Invitation For a Controlled Experiment

Hello.
I am a self-taught operator/software designer.
I developed Anubis. A cpp forensic AI weights scanner.
I tested Anubis against algorithms of my design and I think it has matured enough for outsider testing.

I propose a rigorous, controlled experiment where a corporation or even professionals to send or share any format of weights with any kind of payloads in them to test Anubis's efficacy and detection capabilities.

We -both me and the whoever is interested in collaboration- will adhere to ISO/IEEE standards in experiment design, reporting and final whitepapers or documents resulting from this experiment.

I offer NO FINANCIAL COMPENSATION. This is a scientific experiment.

Please DM or leave a comment if you are:

1. Serious
2. a Professional
3. Know what ISO/IEEE frameworks are

\---
Cheers!

https://redd.it/1ug3cyr
@r_cpp
projections for stl data structures

using projection in ranges::sort has removed the need write a compartor function or a lambda and is much easier to implement in my opinion

there should exists a similar feature for say sets or priority queues

would be wonnderful if I could just write

priority_queue<Student, Student::marks> for example

https://redd.it/1ug7vd3
@r_cpp
SoA

I am working on a universal SoA library that will leverage C++ reflection. If you're interested in contributing, comment or DM. The first draft is on a private repo for now.

https://redd.it/1uh53rs
@r_cpp
libc

Is what I'm saying correct or not? Doesn't every Linux system need to include glibc so that user-space programs, like Bash, can invoke system calls? In other words, glibc provides the wrappers that let C programs make system calls without me having to write assembly and execute the syscall instruction manually. Is that correct?

https://redd.it/1uhdr25
@r_cpp
Best resources for LLD and HLD using C++? (Is Shrayansh Jain's playlist too theory-heavy?)

Hey everyone,

I’m currently preparing for a role switch and looking for solid, structured resources to master both Low-Level Design (LLD) and High-Level Design (HLD). My primary and preferred programming language is C++.

One of my seniors strongly recommended Shrayansh Jain's (Concept & Coding) LLD and HLD playlists on YouTube. I don’t mind investing in the channel membership if it’s genuinely worth it, but looking through the structure, it feels a bit theory-heavy. I learn best when things are highly practical and implementation-focused rather than just purely conceptual.

For those who have taken it or used other resources:

1. Is Shrayansh's course worth it if my goal is to implement a machine-coding round?
2. Since most popular LLD content out there is flooded with Java/Spring Boot examples, what are the best high-signal resources, repositories, or playgrounds for handling LLD specifically in C++?
3. Any gold-standard recommendations for HLD that focus heavily on practical trade-offs rather than generic theoretical architectures?

Appreciate any leads, GitHub repos, or course suggestions. Thanks!

https://redd.it/1uhv7cu
@r_cpp
I'm building a Cargo-like build system for C++. Currently at v0.3.0 with automatic CMake migration. Looking for feedback.

Hey r/cpp!



I'm a 14-year-old, and I've spent my summer building \`deft\` — a build system for C++ that works like Cargo.



Current status:

* **Core Engine:** High-performance, zero-dependency C/C++ build system written in Rust.
* **Build Optimization:** Global build caching and strict toolchain pinning are fully functional.
* **Manifest Support:** Custom, dependency-free TOML parser handles basic profiles (`[profile.c]`, `[profile.cpp]`), language standards, optimization levels, macro definitions (`defines`), and the low-level `extra_flags` array.



I ported nlohmann/json and it worked flawlessly.



GitHub: [https://github.com/deft-cli/deft](https://github.com/deft-cli/deft)



I'm looking for feedback from C++ devs.

https://redd.it/1ui7jlf
@r_cpp
r/cpp removes human made posts as written by AI

See https://www.reddit.com/r/cpp/comments/1ui5ujb/comment/oufi4x3/?screen\_view\_count=5

How am I supposed to share what I work on?

It's never nice to have what you wrote called slop, I guess people here don't realize how hurtful it can be u/STL

https://redd.it/1uijvmt
@r_cpp
New C++ Conference Videos Released This Month - June 2026 (Updated to Include Videos Released 2026-06-22 - 2026-06-28)

C++Online

2026-06-22 - 2026-06-28

Keynote: I Fixed Move Semantics - Jason Turner - [https://youtu.be/TJhMGS9sRlw](https://youtu.be/TJhMGS9sRlw)
Singletons Are Not Evil - You’re Just Using Them Wrong - Mostafa Mahmoud Ali - https://youtu.be/Bn5RFaXATuU

2026-06-15 - 2026-06-21

The Art of API Design - Christoph Stiller - [https://youtu.be/d5djrT4qfHc](https://youtu.be/d5djrT4qfHc)
Top-Performance Genetic Programming - Can Only C++ Get You There? - Eduardo Madrid - https://youtu.be/oBQDe56Yi3Q

2026-06-08 - 2026-06-14

Monads Meet Mutexes - Arne Berger - [https://youtu.be/AisGDOoF82U](https://youtu.be/AisGDOoF82U)
Lock-free Queues in the Multiverse of Madness - Dave Rowland - https://youtu.be/eHmjkFdQl00

2026-06-01 - 2026-06-07

Writing C++ Code is Challenging, Writing Performant C++ Code is Daunting - Dmitrii Radivonchik - [https://youtu.be/R2sm9mailuU](https://youtu.be/R2sm9mailuU)
Case Study - Purging Undefined Behavior and Intel Assumptions in a Legacy Codebase - Roth Michaels - https://youtu.be/H-dHTeSR\_n8

ADC

2026-06-22 - 2026-06-28

Demystifying std::memory\_order - Timur Doumler - [https://youtu.be/yc2HC2w5pzI](https://youtu.be/yc2HC2w5pzI)
Building Smartphone Instruments from Commodity Hardware - HID Controllers, Embedded Audio, and Modular Design - Calvin McCormack - https://youtu.be/uqKkP0zFBGg
Why Do People Actually Buy Music Software, Anyway? - James Russell - [https://youtu.be/25sYPk2ZxIY](https://youtu.be/25sYPk2ZxIY)
Contrapunk - From Palestrina's Rules to Real-Time MIDI Harmony - Vibhav Bobade - https://youtu.be/GreYwDBFWb4

2026-06-15 - 2026-06-21

Scripting Architecture for a DAW-like Plugin - How we Implemented Lua and JavaScript Scripting for Synthesizer V Studio - Kanru Hua - [https://youtu.be/CKOvmBRdHAA](https://youtu.be/CKOvmBRdHAA)
Patterns of Practice: Live Coding and the Logic of South Asian Traditional Music - Abhinay Khoparzi - https://youtu.be/n0-XpUhZ7Dc
ADC 2015 to 2035 - Looking Back at 10 Years of Audio Dev, and Peering Forward at the Next 10 - Julian Storer - [https://youtu.be/WvVur2\_aGHU](https://youtu.be/WvVur2_aGHU)
From DAW to Game Engine - Unfiltered Creativity - Nikhil Dahake - https://youtu.be/5PtMWJLFjyo

2026-06-08 - 2026-06-14

Low Latency Android Audio with improved CPU Performance - Phil Burk - [https://youtu.be/DtBrKEu0R0g](https://youtu.be/DtBrKEu0R0g)
Linux as the Conductor - Driving Pre-Compiled Audio DSP Kernels on C7x for Real-Time Processing - Vishnu Pratap Singh - https://youtu.be/Auq9WnHNtPo
Overview of Granular Synthesis - Avrosh Kumar - [https://youtu.be/QpBV24nWg2M](https://youtu.be/QpBV24nWg2M)
The Agentic Symphony - Multi-Agent Collaboration for Emergent Musical Composition - Meera Sundar - https://youtu.be/QMUXoImgTIA

2026-06-01 - 2026-06-07

Beyond the DAW - Designing a Procedural Sequencer Powered by Music-Theory - Romy Dugue & Cecill Etheredge - [https://youtu.be/48sH4wQUDAs](https://youtu.be/48sH4wQUDAs)
From DAW Users to Audio Developers - Teaching JUCE to Creative Minds - Milap Rane - https://youtu.be/200UrugEanY
Music Design and Systems - Achieving Inaudibly Complex Systems in Video Games - Liam Peacock - [https://youtu.be/R6raBvCNsQo](https://youtu.be/R6raBvCNsQo)
Developing for Avid’s Audio Ecosystem - Rob Majors - https://youtu.be/91-7YWVKRE4

CppCon

2026-06-22 - 2026-06-28

C++ The Documentary: Live Panel Discussion with Bjarne Stroustrup, Herb Sutter & More - [https://youtu.be/zMYZ5MFQAho](https://youtu.be/zMYZ5MFQAho)

2026-06-01 - 2026-06-07

Lightning Talk: Navigating Code Reviews
reserve() and capacity() for flat containers

I just finished the new chapter in "C++23 - The Complete Guide" about flat containers and would like to share and discuss my advice about how to use reserve() and capacity() for flat containers (thanks to Jonathan Wakely who was pointing parts of this out).
It might be a surprise that these member functions do not exist as usually vectors are used inside flat containers and reserve() is a key performance feature of them.

However, here is how you can reserve more memory:

For flat\_set and flat\_multiset:

&#8203;

auto vec = std::move(fset).extract(); // temporarily extract the underlying vector
data.reserve(vec.capacity()
5); // raise capacity by a factor of 5
fset.replace(std::move(vec)); // move the vector back into the flat set

For flat\_map and flat\_multimap:

&#8203;

auto newCapa = fmap.keys().capacity()
5; // raise capacity by a factor of 5
auto data = std::move(fmap).extract(); // extract underlying vectors
data.keys.reserve(newCapa); // raise capacity of vector for keys
data.values.reserve(newCapa); // raise capacity of vector for values
fmap.replace(std::move(data.keys), // move the vectors back
std::move(data.values))

Note also that there is another pretty hacky way, but only for flat maps and multimaps (here mapping strings to double's):

&#8203;

auto newCapa = fmap.keys().capacity()
5;
constcast<std::vector<std::string>&>(fmap.keys()).reserve(newCapa);
const
cast<std::vector<double>&>(fmap.values()).reserve(newCapa);

Yes, ugly, but works... ;-)

I am still working on adding reserve() and capacity() to the standard flat containers (see wg21.link/p3779)



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