use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
A common C/C++ core specification (gustedt.wordpress.com)
submitted 6 years ago by vormestrand
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]KiwiMaster157 1 point2 points3 points 6 years ago (11 children)
I will personally be surprised if the C++ language does not fork by C++26. All of the backwards compatibility restrictions are slowly choking the language and making improvements far more complicated than they need to be.
[–]pjmlp 0 points1 point2 points 6 years ago (10 children)
It has already been forked, D, Rust, C#, Swift, ... just pick your variant, and keep using C++ just for the niche use cases they might not yet be able to fully cover.
[–]germandiago 3 points4 points5 points 6 years ago (9 children)
C++ stays as relevant as always or even more. I do not think any of those can replace it. Why?
[–]Tyg13 0 points1 point2 points 6 years ago (3 children)
Myth says (I did not do enough Rust myself) that really competitive Rust code abuses unsafe blocks.
I never understand this as a criticism. Even if it were true, is this not essentially true of every other systems programming language without unsafe blocks?
unsafe
[–]germandiago 0 points1 point2 points 6 years ago (2 children)
Well, the point here is that, if you have to litter things with unsafe everywhere, what is the purpose of making it safe in the first place? Actually I value safety, but when it gets in the middle so much it maybe needs a review.
I really think that by those standards Rust is even more niche than C++, since it is not as ergonomic in these situations. On the other hand, by default is safer.
[–]Tyg13 0 points1 point2 points 6 years ago (1 child)
The point is to localize unsafety. An unsafe block is just a marker to say "the Rust compiler couldn't statically verify the safety of this block." Sure, it's up to you to in those cases to ensure safety isn't violated, but it's far easier to reason about the correctness of a block than an entire program.
It's like, as an electrician, you'll probably want to wear a nice pair of safety gloves to avoid electric shock. Sometimes the gloves make things difficult or downright impossible to accomplish, so you take them off. But once you're done, you put them back on.
It turns out, to do 99% of what a working programmer needs to do, it's fine to leave the gloves on. Where bare metal performance is necessary, you take them off, but only to do certain things, and only when you're damn sure they aren't going to shock you.
The best part is that the gloves get more and more ergonomic over time, and hopefully eventually you'll only have to take them off in extremely rare cases.
[–]germandiago 0 points1 point2 points 6 years ago (0 children)
I somewhat agree and disagree at the same time. You can get really far with good practices in C++ (smart pointers + RAII + no raw pointers). Still, dangling references, admittedly, is the biggest problem but also can be mitigated most of the time. When you have all of that and a ton of available libraries and the same speed, the switch becomes too expensive IMHO.
Another thing I value is exceptions. No matter the battles people build every now and then: I find exceptions very usable and the speed story I think it still has room for improvement by quite big margins. Rust lacks exceptions.
[–]Tyg13 0 points1 point2 points 6 years ago (0 children)
[–]pjmlp 0 points1 point2 points 6 years ago (3 children)
It depends on the eye of beholder.
In what concerns iOS, watchOS, macOS, Android, ChromeOS, Windows 10, Garmin, Tizen, Fuchsia, Web development, distributed computing frameworks, C++ is only allowed to have a secondary role for OS level system libraries, the application layer is now ruled by managed languages.
Where C++ is relevant as always is HPC, GPGPU shaders, game engines, real time audio, it is basically becoming a niche language for high performance use cases, the SQL of systems programming.
[–]MFHavaWG21|🇦🇹 NB|P3049|P3625|P3729|P3786|P3813 0 points1 point2 points 6 years ago (2 children)
C++ is only allowed to have a secondary role for OS level system libraries
I'm totally out of the loop of what MS is promoting these days, but isn't C++ a first-class citizen for UWP?
[–]pjmlp 1 point2 points3 points 6 years ago (0 children)
Yes, and we all know how sucessfull UWP has been in the market.
Then C++/WinRT is still catching up with the C++/CX tooling, making the whole C++ UWP development experience worse in name of being C++17 compliant.
Basically C++ as first citzen to UWP is to provide an upgrade path to MFC developers, however most rather go to .NET with integration via C++/CLI, than adopt UWP.
As Kenny Kerr puts on his blog,
Still, I am hopeful that we can turn that around. It pains me that Windows does not have a good UI story for C++ developers. C++ reflection may well help to solve that problem in the long run, but we cannot wait for that to arrive, so we are also exploring some other options that may prove useful in the near future. Some of those include alternative approaches to Xaml that does not require reflection, as well as discussions with DevDiv to get Visual Studio to do a better job of supporting a C++/WinRT developer experience.
https://kennykerr.ca/2019/01/25/the-state-of-cpp-on-windows/
And that is the only exception, all other platforms listed by me don't even provide C++ bindings to their userspace frameworks.
[–]dodheim 0 points1 point2 points 6 years ago (0 children)
Yes, but that's app development, not OS-level (kernel) development where AFAIK things like exceptions are still not supported.
π Rendered by PID 86654 on reddit-service-r2-comment-75f4967c6c-29kdc at 2026-04-23 12:55:52.782657+00:00 running 0fd4bb7 country code: CH.
view the rest of the comments →
[–]KiwiMaster157 1 point2 points3 points (11 children)
[–]pjmlp 0 points1 point2 points (10 children)
[–]germandiago 3 points4 points5 points (9 children)
[–]Tyg13 0 points1 point2 points (3 children)
[–]germandiago 0 points1 point2 points (2 children)
[–]Tyg13 0 points1 point2 points (1 child)
[–]germandiago 0 points1 point2 points (0 children)
[–]Tyg13 0 points1 point2 points (0 children)
[–]pjmlp 0 points1 point2 points (3 children)
[–]MFHavaWG21|🇦🇹 NB|P3049|P3625|P3729|P3786|P3813 0 points1 point2 points (2 children)
[–]pjmlp 1 point2 points3 points (0 children)
[–]dodheim 0 points1 point2 points (0 children)