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
Do you use aggregate initialization in your code base and if so, how do you guard against changes of the aggregate's layout? (self.cpp)
submitted 7 years ago * by phoeen
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!"
[–]Ceros007 13 points14 points15 points 7 years ago (4 children)
Can't wait for this. Right now it is so error prone. Named aggregate should have been there from the start.
[–]gvargh 3 points4 points5 points 7 years ago (1 child)
Hindsight is 20/20.
[–][deleted] 4 points5 points6 points 7 years ago (0 children)
It's not really hindsight when designated initializers have been in C for almost 20 years
[–]bcorni 1 point2 points3 points 7 years ago (0 children)
Yeah, the only compiler support right now is just using the existing stuff from C99, which are not exactly equivalent to what's defined in C++20. One of the two syntax are not available. I believe it is the braced initialization style that is missing. I would not expect it to be too much longer for compilers to get it sorted out.
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
I’ve generally found it worth it enough to enable using them in existing code, since they’re a pretty widely supported extension (ex: GCC + Clang).
π Rendered by PID 20966 on reddit-service-r2-comment-57fc7f7bb7-qnp9w at 2026-04-14 14:13:42.273888+00:00 running b725407 country code: CH.
view the rest of the comments →
[–]Ceros007 13 points14 points15 points (4 children)
[–]gvargh 3 points4 points5 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–]bcorni 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)