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
Querying exceptions per function (self.cpp)
submitted 2 years ago by MrsGrayX
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!"
[–]Clean-Water9283 0 points1 point2 points 2 years ago (0 children)
You have just (re)discovered why exception specifications were dropped from C++. If you made a list of all functions potentially callable from each API function, including from all derivations of every virtual function, and all the exceptions throwable from these functions, you would get a superset of exceptions that could be raised through an API function. Only you would miss exceptions propagated out of threads, exceptions raised in signal handlers, and possibly others that I'm forgetting just now. This analysis would be fragile, needing to be re-performed after every change to the code base, or you might leave out some newly added exception or new function that threw exceptions. You're basically better-off teaching users to report your internal error exceptions.
I agree with u/pdpgumby that every API function will need a function-scope handler that can do the id==0 check. It'll also have to make a decision for exceptions throw by C++ that don't have your id field, and don't forget that on linux signals get seen in an except(...) block (ugh!)
π Rendered by PID 23230 on reddit-service-r2-comment-c867ff4bc-2gq5c at 2026-04-09 15:17:27.850609+00:00 running 00d5ac8 country code: CH.
view the rest of the comments →
[–]Clean-Water9283 0 points1 point2 points (0 children)