-
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
Functional vs Object-oriented from a performance-only point of view
I was wondering if not having to manage the metadata for classes and objects would give functional-style programs some performance benefits, or the other way around? I know the difference must be negligible, if any, but still.
I'm still kind of a newbie so forgive me if I'm just talking rubbish.
https://redd.it/1nl8m5x
@r_cpp
Can't solve problems
So I've completed c language and almost about to complete dsa in it but now what I've realised is I can't solve any problems even with the same concept (for eg you give me a stack problem I know stack but I can't solve a problem and even if you give me the same question i saw previously i will have to revise it to write that code from scratch) basically i can understand i can explain every function but I can't solve it idk it's pretty frustrating my coding club test is in a few weeks and it's bothering me what should i do
https://redd.it/1nkzka5
@r_cpp
Pointer
Hello guys!!, sorry, my english is so bad, am speak spanish, but i try to speak english too
a have a question
How i call the final pointer from a element from a array or list in c++, a im assing the variable pointer "end list element" in the lexic code?, but i need to explay to mi profesor where is come from, how i can explai where come from the pointer end list?
Thank you in advance for your patience!!
https://redd.it/1nkte3m
@r_cpp
Yesterday’s talk video posted: Reflection — C++’s decade-defining rocket engine
https://herbsutter.com/2025/09/18/yesterdays-talk-video-posted-reflection-cs-decade-defining-rocket-engine/
https://redd.it/1nkg3ra
@r_cpp
Cppless: Single-Source and High-Performance Serverless Programming in C++
https://dl.acm.org/doi/10.1145/3747841
https://redd.it/1nkbixl
@r_cpp
Even more auto
https://abuehl.github.io/2025/09/17/even-more-auto.html
https://redd.it/1nk3aus
@r_cpp
Debugging User-Defined Types & Containers Using Value Formatting - Example Repo
https://github.com/codeinred/lldb_user_types
https://redd.it/1njsvza
@r_cpp
{fmt} 12.0 released with optimized FP formatting, improved constexpr and module support and more
https://github.com/fmtlib/fmt/releases/tag/12.0.0
https://redd.it/1njijl0
@r_cpp
Combating headcrabs in the Source SDK codebase
https://pvs-studio.com/en/blog/posts/cpp/1281/
https://redd.it/1nj8uuu
@r_cpp
Meta: Unwritten Rules?
Recently there was a post that got deleted with this rationale "AI slop is not welcome on r/cpp. Please stop and think about what you're doing." While I understand the desire to remove AI slop. (disclaimer: I used to do AI programming more than 3 decades ago. And I strongly dislike the current perversion of LLM application.) But I do understand that some AI, like LLMs and general statistical inference (like spell checkers), is useful to many (I couldn't survive without spellchecking for example). Hence the threat of being banned for some assistive AI uses to be a bit dramatic.
More importantly, this made me wonder what, if any, other such banning or drastic content moderation rules there are in this forum above the stated ones?
\-- Just wondering "out loud". --
(edited to fix a grammar error.. ironic I know)
https://redd.it/1nipls9
@r_cpp
VImpl: A Virtual Take on the C++ PImpl Pattern
https://solidean.com/blog/2025/the-vimpl-pattern-for-cpp/
https://redd.it/1nigic5
@r_cpp
Hey guys! Just wanted to know as someone who's 30, would I find it difficult now to start learning code?
I've been working construction for a while and honestly I dont wanna do it anymore, ive always been interested in coding but obviously never been able to jump into it. So just looking for some advice or some direction if you dont think its too late.
https://redd.it/1nhylcr
@r_cpp
¿Vale la pena publicar mi librería de enteros sin signo “OfUint” en GitHub?
Recientemente creé una librería de tipos enteros sin signo llamada **OfUint**, que incluye tamaños no estándar además de los comunes:
`OfUint1`, `OfUint2`, `OfUint4`, `OfUint8`, `OfUint16`, `OfUint32`, `OfUint64` y `OfUint128`.
👉 **Ventajas principales:**
* En **cálculo masivo**, los tipos pequeños (`OfUint1`, `OfUint2`, `OfUint4`) son más rápidos que `unsigned char` o `unsigned short`.
* En **cálculo unitario**, tienen el mismo rendimiento que los nativos, pero con un plus de seguridad.
* Se pueden usar exactamente igual que cualquier tipo nativo en C/C++ (`+`, `-`, `*`, etc.).
Ejemplo rápido:
OfUint4 a = 7;
OfUint4 b = 9;
OfUint4 c = a * b + 3; // funciona igual que con uint8_t
Mi duda es:
👉 ¿Les parece interesante que publique esta librería en GitHub con benchmarks y documentación, o no vale la pena?
https://redd.it/1nhtg64
@r_cpp
Why did stl algorithms use iterators in interface?
This part doesn't make any sense to me, almost 99.9% of time you want to do it on the whole thing but you can't, if just the algorithms were
```cpp
template<class Container,class Value>
auto find_if(Container const& c,Value value);
```
then I can just do
std::vector<int> a;
auto it = std::find(a,0);
but someone will say "how about if a sub range?!" then the stl should provide `std::subrange` that is just a simple wrapper for
template<class It,class Sen = It>
struct subrange : private Sen { // for empty senitiel
subrange(It begin,Sen end) : Sen(end),_begin(begin) {}
It begin(): const { return _begin;}
Sen end(): const { return static_cast<Sen&>(*this);}
It _begin;
};
then if you want a dubrange do
std::vector<int> a;
auto it = find(subrange(a.begin(),a.end() - 5),0);
seems like most logical thing to do, make the common case easy and the less common one still possible and also it allows checks depending on the container for debug builds or speedups like map.lower_bound by using a friend function instead of having to account for both a member function and a free function this annoys generic programming
the current stl design is backwards make the common case annoying and the less common one easy.
(I also think ranges having still the iterators overloads is a mistake, wish they removed them)
https://redd.it/1nhmwhr
@r_cpp
CLion EAP introduces constexpr debugger
https://blog.jetbrains.com/clion/2025/09/introducing-constexpr-debugger/
https://redd.it/1nhfxq6
@r_cpp
C++ Learning Platform - Built for the Upcoming Generation
Hey r/cpp! 👋
I've been working on something I think this community might appreciate: [**hellocpp.dev**](http://hellocpp.dev) \- a modern, interactive C++ learning platform designed specifically for beginners.
# What is it?
An online C++ learning environment that combines:
* **Interactive lessons** with real-time code execution
* **Hands-on exercises** that compile and run in your browser
* **Progress tracking** and achievements to keep learners motivated
* **Beginner-friendly error messages** that actually help instead of intimidate
# Why are we building this?
Learning C++ in 2025 is still unnecessarily difficult for beginners. Most resources either:
* Assume too much prior knowledge
* Require complex local development setup
* Don't provide immediate feedback
* Use outdated examples and practices
We're trying to change that by creating a **modern, accessible pathway** into C++ that follows current best practices (C++17/20/23) and provides instant feedback.
# What makes it different?
* **Zero setup** \- write and run C++ code immediately in your browser
* **Modern C++** \- teaches current standards and best practices
* **Interactive learning** \- not just reading, but doing
* **Community driven** \- open to feedback and contributions
# How you can help
The best way to support this project right now is to **try the first chapter** and give us honest feedback:
* What works well?
* What's confusing?
* What would you do differently?
* How can we make C++ more approachable for newcomers?
We're particularly interested in feedback from experienced C++ developers on:
* Curriculum accuracy and best practices
* Exercise difficulty progression
* Code style and modern C++ usage
# The bigger picture
C++ isn't going anywhere - it's still critical for systems programming, game development, embedded systems, and high-performance applications. But we're losing potential developers because the learning curve is steep and the tooling can be intimidating.
If we can make C++ more accessible to the next generation of developers, we strengthen the entire ecosystem.
**Try it out**: [hellocpp.dev](http://hellocpp.dev)
# Think you can beat me?
I'm currently sitting at the top of the leaderboard. Think you can dethrone me? Complete the exercises and see if you can claim the #1 spot. Fair warning though - I know where all the edge cases are 😉
# Support the project
If you like the direction we're heading and want to support us building something great for the C++ community, we have a [Patreon](https://patreon.com/HelloCpp?utm_medium=unknown&utm_source=join_link&utm_campaign=creatorshare_creator&utm_content=copyLink) where you can support development. Every contribution helps us dedicate more time to creating quality content and improving the platform.
Building this for the community, with the community. Let me know what you think!
Learn more here:
[https://www.patreon.com/posts/welcome-to-your-138189457](https://www.patreon.com/posts/welcome-to-your-138189457)
https://redd.it/1nl7kz5
@r_cpp
would reflection make domain-specific rule engines practical?
Hey,
I was playing with a mock reflection API in C++ (since the real thing is not merged yet).
The idea: if reflection comes, you could write a small "rule engine" where rules are defined as strings like:
amount > 10000
country == "US"
Then evaluate them directly on a struct at runtime.
I hacked a small prototype with manual "reflect()" returning field names + getters, and it already works:
\- Rule: amount > 10000 → true
\- Rule: country == US → false
Code: (mocked version)
https://godbolt.org/z/cxWPWG4TP
\---
Question:
Do you think with real reflection (P2996 etc.) this kind of library would be actually useful?
Or is it reinventing the wheel (since people already embed Lua/Python/etc.)?
I’m not deep into the standard committee details, so curious to hear what others think.
https://redd.it/1nkyumx
@r_cpp
C++ Memory Safety in WebKit
https://www.youtube.com/watch?v=RLw13wLM5Ko
https://redd.it/1nkib84
@r_cpp
MSVC's Unexpected Behavior with the OpenMP lastprivate Clause
According to the Microsoft reference:
>the value of each lastprivate variable from the lexically last section directive is assigned to the variable's original object.
However, this is not what happens in practice when using MSVC.
Consider this simple program:
#include <omp.h>
#include <iostream>
int main() {
int n = -1;
#pragma omp parallel
{
#pragma omp sections lastprivate(n)
{
#pragma omp section
{
n = 1;
Sleep(10);
}
#pragma omp section
{
n = 2;
Sleep(1);
}
}
printf("%d\n", n);
}
return 0;
}
This program always prints 1. After several hours of testing, I concluded that in MSVC, lastprivate variables are assigned the value from the last section to finish execution, not the one that is lexically last.
The reason for this post is that I found no mention of this specific behavior online. I hope this saves others a headache if they encounter the same issue.
Thank you for your time.
https://redd.it/1nkder8
@r_cpp
Italian C++ Meetup - Beyond Assertions (Massimiliano Pagani)
https://youtu.be/6SFoZWHGn0E?t=194
https://redd.it/1nk53vp
@r_cpp
Introducing the Constexpr Debugger
https://blog.jetbrains.com/clion/2025/09/introducing-constexpr-debugger/
https://redd.it/1nk355k
@r_cpp
Concept-based Generic Programming - Bjarne Stroustrup - CppCon 2025
https://youtu.be/VMGB75hsDQo
https://redd.it/1njqbs1
@r_cpp
Looking for feedback on my short C++ coding tips video (made with NotebookLM)
https://youtu.be/DtwZzlmYElE
https://redd.it/1njd29u
@r_cpp
Rust Coreutils Are Performing Worse Than C/C++ based GNU Coreutils in Ubuntu
https://news.itsfoss.com/ubuntu-uutils-performance-issues/
https://redd.it/1nirrpt
@r_cpp
Parallel C++ for Scientific Applications: Working With Types
https://www.youtube.com/watch?v=F15ixlwyDlA
https://redd.it/1nim6dz
@r_cpp
Made a CLI tool for ASCII text in C++
Hey everyone! I've been working on my first C++ project and wanted to share it here. It’s a lightweight command-line tool that lets you render text into ASCII art, with support for multiple fonts, a scrolling banner effect and outputting files.
I built it mainly to learn C++, and picked up CMake on the way and used CLI11 for argument parsing and toml++ for parsing files.
I’d love feedback on the code, CLI design, or any feature suggestions. Contributions, especially in the form of new fonts, are also very welcome.
Check it out here!
https://redd.it/1nih3wv
@r_cpp
I am looking for a decent ide without ai features
http://geany.org
https://redd.it/1nhrajh
@r_cpp
New C++ Conference Videos Released This Month - September 2025
C++Now
2025-09-01 - 2025-09-07
How to Build a Flexible Robot Brain One Bit at a Time - Ramon Perez - [https://youtu.be/akJznI1eBxo](https://youtu.be/akJznI1eBxo)
Zngur - Simplified Rust/C++ Integration - David Sankel - https://youtu.be/k\_sp5wvoEVM
Advanced Ranges - Writing Modular, Clean, and Efficient Code with Custom Views - Steve Sorkin - [https://youtu.be/5iXUCcFP6H4](https://youtu.be/5iXUCcFP6H4)
2025-09-08 - 2025-09-14
std::optional — Standardizing Optionals over References - A Case Study - Steve Downey - https://youtu.be/cSOzD78yQV4
Are We There Yet? - The Future of C++ Software Development - Sean Parent - [https://youtu.be/RK3CEJRaznw](https://youtu.be/RK3CEJRaznw)
Alex Stepanov, Generic Programming, and the C++ STL - Jon Kalb - https://youtu.be/yUa6Uxq25tQ
ACCU Conference
2025-09-08 - 2025-09-14
How to Think Like a Programmer - Connor Brook - [https://youtu.be/aSptXRefE6A](https://youtu.be/aSptXRefE6A)
C++ Error Handling Omitted - Roger Orr - https://youtu.be/QXpk8oKiFB8
Building a Career Off-Road - Sherry Sontag, CB Bailey, Callum Piper, Cal Pratt & Daniel Kiss - [https://youtu.be/7d44F6N8eZI](https://youtu.be/7d44F6N8eZI)
2025-09-01 - 2025-09-07
The Hidden Techical Debt Crisis: When Non-Engineers Write Code - Felix Aldam-Gates - https://youtu.be/VXb4n8FjcrE
The 10 Essential Features for the Future of C++ Libraries - Mateusz Pusz - [https://youtu.be/K-uzaG9S8bg](https://youtu.be/K-uzaG9S8bg)
An Introduction To Go - Dom Davis - https://youtu.be/l36Wqmw2JZo
C++ on Sea
2025-09-08 - 2025-09-14
Safe and Readable Code - Monadic Operations in C++23 - Robert Schimkowitsch - [https://youtu.be/fyjJPwkVOuw](https://youtu.be/fyjJPwkVOuw)
Missing (and future?) C++ Range Concepts - Jonathan Müller - https://youtu.be/T6t2-i5t1PU
Mind the Gap (Between Your Code and Your Toolchain) - Yannic Staudt - [https://youtu.be/iqhbBjcoCnM](https://youtu.be/iqhbBjcoCnM)
2025-09-01 - 2025-09-07
Welcome to v1.0 of the meta::[[verse\]\]! - Inbal Levi - https://youtu.be/Wbe09UFDvvY
To Err is Human - Robust Error Handling in C++26 - Sebastian Theophil - [https://youtu.be/A8arWLN54GU](https://youtu.be/A8arWLN54GU)
The 10 Essential Features for the Future of C++ Libraries - Mateusz Pusz - https://youtu.be/TJg37Sh9j78
ADC
2025-09-01 - 2025-09-07
Current Approaches and Future Possibilities for Inter Audio Plugin Communication - Janos Buttgereit - [https://youtu.be/YHWdDLi6jgc](https://youtu.be/YHWdDLi6jgc)
Keynote: Sonic Cartography - Navigating the Abstract Space-Time of Sound - Carla Scaletti - https://youtu.be/iq75B8EkLv4
https://redd.it/1nhrzq6
@r_cpp
How I Learned to Be an Effective Boost Review Manager — My Tips & Templates
Hey r/cpp 👋
I recently published a post on my journey as a Boost Review Manager and wanted to share some of the insights that might help others stepping into this role, or even those just curious about how Boost peer reviews tick:
How to Be an Effective Boost Review Manager
Here’s what you’ll find inside:
A breakdown of the Review Manager’s responsibilities—not just technical, but facilitating fair discussion, keeping things structured, and summarizing feedback.
Templates & timeline suggestions: announcement emails, reminders, closing notes, and decision reports. (Stuff I wish I had when I first did this.)
Reflections on how to balance being supportive to the author while making sure the library meets Boost’s standards (design, docs, maintainability).
Why this matters:
Boost is hugely influential in C++ — many of its libraries or concepts make their way into the standard. Ensuring the review process is fair, clear, and useful matters not just for the author, but for the community and long-term health of the library ecosystem.
Would love to hear from folks who’ve been Review Managers before:
What did you do differently than what I describe?
What pushed back on your plans?
What wisdom would you give new/aspiring Review Managers?
If you give it a read, I’d appreciate any feedback, suggestions, or criticism. Thanks!
https://redd.it/1nhl4rn
@r_cpp
What is the current state of modules for an open source library?
Hi there, I'm building a tensor library and have it working to the point where I have some simple models like llama3 or a vision transformer working on cpu.
I need to take a decision before continue, and that is if to try to migrate from headers to modules. Since I didn't release the library, nobody is using it and will take my time since kernels are not optimized yet, I'm not attached to current versions of compilers or cmake, and I can use new stuff and some "not so ready" features like modules.
I was looking into some posts, but they may be outdated now, and I would like to know your opinion.
https://redd.it/1nh5e8c
@r_cpp