std::formatter specialization for smart pointers
Currently something like
std::uniqueptr<int> uptr = std::makeunique<int>(42);
std::sharedptr<int> sptr = std::makeshared<int>(42);
std::println("uptr: {}", uptr);
std::println("sptr: {}", sptr);
is ill formed because there is no specialization of std::formatter for smart pointer types.
On the other hand,
std::cout << "uptr: " << uptr << '\n';
std::cout << "sptr: " << sptr << '\n';
do work because ostream defines overloads for smart pointer types.
Please let me know if anyone has thoughts or if there's some reason that these types haven't been specialized that I'm missing.
https://redd.it/1ufjvur
@r_cpp
Currently something like
std::uniqueptr<int> uptr = std::makeunique<int>(42);
std::sharedptr<int> sptr = std::makeshared<int>(42);
std::println("uptr: {}", uptr);
std::println("sptr: {}", sptr);
is ill formed because there is no specialization of std::formatter for smart pointer types.
On the other hand,
std::cout << "uptr: " << uptr << '\n';
std::cout << "sptr: " << sptr << '\n';
do work because ostream defines overloads for smart pointer types.
Please let me know if anyone has thoughts or if there's some reason that these types haven't been specialized that I'm missing.
https://redd.it/1ufjvur
@r_cpp
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
Am I the only one who thinks this? (about enum)
The main differences between an
// Dummy wrapper struct
struct EnumName
{
enum Value
{
ZERO
};
// the scope is located in "EnumName"
// so you access "EnumName::ZERO"
};
https://redd.it/1uflgw3
@r_cpp
The main differences between an
enum and enum class|struct is that the latter has its own scope, but you lose the implicit operators from enum, and the closest to it is as presented. I wish that enum struct maintained the operators, acting like the C enum, but with it's own scope.// Dummy wrapper struct
struct EnumName
{
enum Value
{
ZERO
};
// the scope is located in "EnumName"
// so you access "EnumName::ZERO"
};
https://redd.it/1uflgw3
@r_cpp
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
Easy JSON ImGui Config Files for Hack Menus
https://youtu.be/2P7uSx7EA2c?si=9b-jpvqZvDQ6FL9E
https://redd.it/1ufucmg
@r_cpp
https://youtu.be/2P7uSx7EA2c?si=9b-jpvqZvDQ6FL9E
https://redd.it/1ufucmg
@r_cpp
YouTube
Easy JSON ImGui Config Files for Hack Menus
🔥 Learn How to Easily Save Config Files for ImGui Hack Menus
👨💻 Buy Our Courses: https://guidedhacking.com/register/
💰 Donate on Patreon: https://patreon.com/guidedhacking
❤️ Follow us on Social Media: https://linktr.ee/guidedhacking
🔗 Article Link: ht…
👨💻 Buy Our Courses: https://guidedhacking.com/register/
💰 Donate on Patreon: https://patreon.com/guidedhacking
❤️ Follow us on Social Media: https://linktr.ee/guidedhacking
🔗 Article Link: ht…
ACCU On Sea 2026 trip report, still with AI!
https://mropert.github.io/2026/06/24/accu_on_sea_2026/
https://redd.it/1ufx4ro
@r_cpp
https://mropert.github.io/2026/06/24/accu_on_sea_2026/
https://redd.it/1ufx4ro
@r_cpp
mropert.github.io
ACCU On Sea 2026 trip report, still with AI! · Mathieu Ropert
Two conferences in one. You can see France in the distance but then they pour wine from a can into plastic glass to remind you where you are.
Latches in C++ 20 concurrency - just like the CountdownLatch of Java concurrency package...
https://som-itsolutions.hashnode.dev/latches-in-c-20-concurrency-just-like-the-countdownlatch-of-java-concurrency-package
https://redd.it/1ufxmns
@r_cpp
https://som-itsolutions.hashnode.dev/latches-in-c-20-concurrency-just-like-the-countdownlatch-of-java-concurrency-package
https://redd.it/1ufxmns
@r_cpp
Som's Tech World...
Latches in C++ 20 concurrency - just like the CountdownLatch of Java concurrency package...
Multithreaded programming is inherently difficult. One of the reasons is that we can't have control over how a thread will start and finish, in which order - it all depends upon the thread scheduling
Tuning a Server for Benchmarking
https://david.alvarezrosa.com/posts/tuning-a-server-for-benchmarking/
https://redd.it/1ufwxjg
@r_cpp
https://david.alvarezrosa.com/posts/tuning-a-server-for-benchmarking/
https://redd.it/1ufwxjg
@r_cpp
David Álvarez Rosa
Tuning a Server for Benchmarking | David Álvarez Rosa
Optimizing code starts with measuring it, and a measurement is only useful if it is repeatable: a 2% improvement is invisible under 5% of noise. Yet on an …
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
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
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
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
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
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
Panel discussion for C++: The Documentary
https://www.youtube.com/watch?v=zMYZ5MFQAho
https://redd.it/1ugu3ng
@r_cpp
https://www.youtube.com/watch?v=zMYZ5MFQAho
https://redd.it/1ugu3ng
@r_cpp
YouTube
Inside C++'s Biggest Challenge | Panel Discussion with Bjarne Stroustrup, Herb Sutter & More
https://cppcon.org/
---
C++ The Documentary: Live Panel Discussion with Bjarne Stroustrup, Herb Sutter & More
Watch C++: The Documentary: https://www.youtube.com/watch?v=lI7tMxzSJ7w
Following the New York City premiere at Metrograph, Matt Godbolt moderates…
---
C++ The Documentary: Live Panel Discussion with Bjarne Stroustrup, Herb Sutter & More
Watch C++: The Documentary: https://www.youtube.com/watch?v=lI7tMxzSJ7w
Following the New York City premiere at Metrograph, Matt Godbolt moderates…
Reducing Energy Consumption for Machine Learning Inference on Edge Devices using C++20 Coroutines
https://dl.acm.org/doi/10.1145/3821577
https://redd.it/1ugw7nn
@r_cpp
https://dl.acm.org/doi/10.1145/3821577
https://redd.it/1ugw7nn
@r_cpp
ACM Transactions on Embedded Computing Systems
Reducing Energy Consumption for Machine Learning Inference on Edge Devices using C++20 Coroutines | ACM Transactions on Embedded…
Increasingly, machine learning inference is implemented on relatively low-powered
edge devices, where battery life is a key performance criterion. In this work, we
demonstrate how C++20 coroutines can be used to reorganise the execution order of
an ...
edge devices, where battery life is a key performance criterion. In this work, we
demonstrate how C++20 coroutines can be used to reorganise the execution order of
an ...
Data Access Patterns That Makes Your CPU Really Angry
https://blog.weineng.me/posts/slowest_add/
https://redd.it/1uh443b
@r_cpp
https://blog.weineng.me/posts/slowest_add/
https://redd.it/1uh443b
@r_cpp
weineng
Data Access Patterns That Makes Your CPU Really Angry
Given an array of data, what is the slowest way to sum up the integers? Is it adding the numbers from left to right, adding them randomly, or doing something else? In this post, we are going to build a data access pattern from the ground up that sums numbers…
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
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
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
A deep dive into SmallVector::push_back
https://maskray.me/blog/2026-06-27-a-deep-dive-into-smallvector-push-back
https://redd.it/1uh9xe4
@r_cpp
https://maskray.me/blog/2026-06-27-a-deep-dive-into-smallvector-push-back
https://redd.it/1uh9xe4
@r_cpp
MaskRay
A deep dive into SmallVector::push_back
tl;dr This blog post describes a recent SmallVector::push_back optimization for approximately trivially copyable element types. SmallVector is LLVM's most-used container, and push_back its hot operati
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
https://redd.it/1uhdr25
@r_cpp
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
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
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
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
Reddit
From the cpp community on Reddit
Explore this post and more from the cpp community
Leadwerks Summer Games tournament begins
https://www.youtube.com/watch?v=s_3kj7F59eQ
https://redd.it/1ui0lbx
@r_cpp
https://www.youtube.com/watch?v=s_3kj7F59eQ
https://redd.it/1ui0lbx
@r_cpp
YouTube
Leadwerks Summer Games Tournament
Get Leadwerks Game Engine 5: https://store.steampowered.com/app/251810/?utm_source=youtube&utm_medium=social
In this live developer chat we'll kick off the Summer Games Tournament, play through "Exit: Underground" by MDGunn, and get a sneak peak at what's…
In this live developer chat we'll kick off the Summer Games Tournament, play through "Exit: Underground" by MDGunn, and get a sneak peak at what's…
Collider: A package manager for Meson - A hash proves the bytes, not the source
https://collider.ee/blog/2026-06-28-1500_a_hash_proves_the_bytes_not_the_source/
https://redd.it/1ui5ujb
@r_cpp
https://collider.ee/blog/2026-06-28-1500_a_hash_proves_the_bytes_not_the_source/
https://redd.it/1ui5ujb
@r_cpp
collider.ee
A hash proves the bytes, not the source - Collider
A package and dependency manager for Meson projects.
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
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
GitHub
GitHub - deft-cli/deft: A modern build system for C/C++
A modern build system for C/C++. Contribute to deft-cli/deft development by creating an account on GitHub.
Rigx: toml based build system with native C/C++ support, hermetic build and tool chains leverage nix.
https://github.com/unofficialtools/rigx
https://redd.it/1ui8otp
@r_cpp
https://github.com/unofficialtools/rigx
https://redd.it/1ui8otp
@r_cpp
GitHub
GitHub - unofficialtools/rigx
Contribute to unofficialtools/rigx development by creating an account on GitHub.
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
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
Reddit
cpp-ModTeam's comment on "[ Removed by moderator ]"
Explore this conversation and more from the cpp community