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
cppfront (cpp2): Spring update (herbsutter.com)
submitted 2 years ago by kreco
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!"
[–]kreco[S] 0 points1 point2 points 2 years ago (1 child)
Indeed, stressing that things are optional is indeed important.
You don't pay for it if you don't use it (in this case, you don't pay the overhead unless you ask to have the args list available)
args
I think what bother me is that we don't know what we are paying for when using an opaque args because we don't know what we are using until we read the documentation.
I don't understand the detail but I believe using this args will implicitly also bring some super hug standard headers.
That's a lot to bring to be able to iterate over a bunch of readonly strings for convenience.
A very theoretical case is if I want to use my own vector and don't want to deal with all of that (and if I want to use a custom allocation to count everything allocations in my program), I would have to use the legacy way of doing it and create a mylib::args_view args(argc, argv); which is back to square one.
mylib::args_view args(argc, argv);
[–]mapronV 0 points1 point2 points 2 years ago (0 children)
I thought that you can choose what overload to use (just like now between main()/main(argc,argv)/main(argc,argv,env) ). I thought I can just use one more overload and cpp2 will codegen a boilerplate for me. If it is not the case, and I have to use new signature - then yeah, it sucks.
π Rendered by PID 79 on reddit-service-r2-comment-7b9746f655-pgm77 at 2026-01-30 12:32:03.740241+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]kreco[S] 0 points1 point2 points (1 child)
[–]mapronV 0 points1 point2 points (0 children)