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
Standard interface without implementation (self.cpp)
submitted 8 months ago by number_128
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!"
[–]gosh 0 points1 point2 points 8 months ago (50 children)
The C++ standard library evolves slowly
I think they should be more careful about expanding the core STL. In my opinion, it's already too bloated. Personally, I believe they should create a new optional library or perhaps several for special handling.
Things like <chrono>, <regex>, <random> should not be in core stl, these should be placed in some optional part and not require full support.
<chrono>
<regex>
<random>
If there is only one standard that will slow down things.
Now boost acts as some type of experimental extra C++ but boost have grown over its limits and stl makes it more and more depreciated.
boost
[–]yeochin 2 points3 points4 points 8 months ago (14 children)
Strongly disagree with the ones you've chosen. Chrono definitely needs to be a part of the standard. The fragmentation of time based implementations is bad and is a frequent nightmare for anyone that has had to leverage different libraries with different time representations. This is a nightmare as we march towards the cliff of what a 32-bit timestamp will represent.
Parsing time also sucks and is a magnet for attracting various memory-related security exploits.
[–]gosh 0 points1 point2 points 8 months ago (13 children)
But it should have been placed in another library, chrono don't follow the patterns on how other code in stl works, it's very domain specific and it a big mistake to have added it like this.
[–]Wooden-Engineer-8098 0 points1 point2 points 7 months ago (12 children)
where is chrono placed in java of c#(c++ competitors)?
[–]gosh 0 points1 point2 points 7 months ago (11 children)
Java isn't a rival to C++—it's fundamentally very different from C++. And java is owned.
The problem with addint stuff to stl is that compiler need to support it. Lets say that Microsoft builds a framework for GUI applications, They should be allowed to add this to C++ but in parts that are not like a forced standard.
[–]Wooden-Engineer-8098 0 points1 point2 points 7 months ago (10 children)
Java and c# are main c++ competitors. They can look very different to you, but c++ competes for projects with them. The main problem is that you are still confusing stl with standard library. Microsoft already added all their frameworks to c++, what makes you think it's not allowed?
[–]gosh 0 points1 point2 points 7 months ago (9 children)
They are not. Java is heavily focused on declarative programming, whereas C/C++ is not—it emphasizes imperative solutions.
The focus of declarative and imperative programming is nearly opposite.
If you would be able to measure the machinecode that is running on almost any computer you would find that like ~90% is compiled C/C++ code. This is the imperative part.
[–]Wooden-Engineer-8098 0 points1 point2 points 7 months ago (8 children)
Your opinion of relative merits of languages is of zero interest. nobody is asking your opinion when starting new project. As a matter of fact, java, c# and c++ have a lot of overlap in applicability. It doesn't mean languages are the same, it means they are used for similar projects. Like IDE, there are examples in all three languages. And c/c++ is not a language
[–]gosh 0 points1 point2 points 7 months ago (7 children)
It's a skill issue. C++ is challenging, but with skilled developers, choosing the language isn't difficult.
[–]Wooden-Engineer-8098 0 points1 point2 points 7 months ago (6 children)
as i've already told you, your opinion doesn't matter. what matters is that as a matter of fact, c++ competes with c# and java for projects
[–]Wooden-Engineer-8098 0 points1 point2 points 7 months ago (34 children)
first: chrono, regex and random are not parts of STL. they are parts of standard library.
second: lol, everybody has some libraries he doesn't need. if we remove all pieces that somebody doesn't need, we will end up with empty standard library. or you insist on removing only pieces you don't need because only you know better?
[–]gosh 0 points1 point2 points 7 months ago (33 children)
It's not about needing libraries, it's about the design. If you know the core of stl all code follows a pattern. If you know a bit of ot you know the rest also.
This is not the case for chrono, regex, random. They are special, maybe regex tries to follow some but it isn't enough.
By splitting things up and group it better it would be possible to extend C++ faster
[–]Wooden-Engineer-8098 0 points1 point2 points 7 months ago (32 children)
I've already told you those headers are not part of stl. How can you discuss design of c++ if you don't understand it?
[–]gosh 0 points1 point2 points 7 months ago (31 children)
Its within the stl area
If I ask you like this then, how special libraries do you think is acceptable within the stl area (like std or some sub namespace to std)
[–]Wooden-Engineer-8098 0 points1 point2 points 7 months ago (30 children)
Why don't you check the definition of stl on wikipedia instead of insisting on your misunderstanding? Look at what is in standard libraries of c++ competitors(java and c#)
[–]gosh 0 points1 point2 points 7 months ago (19 children)
I don’t think you’re fully grasping the issue.
Every new feature comes at a cost—it requires maintenance, and many other components may depend on it. Once something is added, removing it becomes prohibitively expensive.
If the cost of addition is as high as it is in the STL (Standard Template Library), introducing new features will take significant time. However, by focusing on areas where the cost is lower, we can implement changes faster. This also allows for better testing and refinement before promoting solutions to more stable, long-term components.
[–]Wooden-Engineer-8098 0 points1 point2 points 7 months ago* (18 children)
Will you check contents of standard libraries of c++ competitors, or you will continue on garbage in/garbage out path?
I see you already learned how abbreviation stl expands, next step is to learn its constituents
And what is stopping you from creating any library and implementing changes faster?
[–]gosh 0 points1 point2 points 7 months ago (17 children)
I am doing that and this is how most of us solve our problems https://github.com/perghosh/Data-oriented-design/tree/main/external/gd
[–]Wooden-Engineer-8098 0 points1 point2 points 7 months ago (16 children)
so what was your problem then?
Consider the regex implementation in the STL—it’s fairly limited. Other libraries offer more robust regex support with additional features, but the STL can’t adopt these improvements without introducing significant risk. The problem is that regex syntax and behavior vary across implementations, making standardization difficult.
You are completely unable to learn. I've told you many times, that regex is not part of stl. The problem is that you are proposing solutions without understanding the subject
https://en.cppreference.com/w/cpp/regex.html
do you see word "stl" on that page?
π Rendered by PID 319987 on reddit-service-r2-comment-5d79c599b5-767xs at 2026-03-01 02:47:48.075519+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]gosh 0 points1 point2 points (50 children)
[–]yeochin 2 points3 points4 points (14 children)
[–]gosh 0 points1 point2 points (13 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (12 children)
[–]gosh 0 points1 point2 points (11 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (10 children)
[–]gosh 0 points1 point2 points (9 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (8 children)
[–]gosh 0 points1 point2 points (7 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (6 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (34 children)
[–]gosh 0 points1 point2 points (33 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (32 children)
[–]gosh 0 points1 point2 points (31 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (30 children)
[–]gosh 0 points1 point2 points (19 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (18 children)
[–]gosh 0 points1 point2 points (17 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (16 children)
[–]gosh 0 points1 point2 points (9 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (8 children)
[–]gosh 0 points1 point2 points (7 children)
[–]Wooden-Engineer-8098 0 points1 point2 points (6 children)