-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception safety #5
Comments
Now it's not possible to use queue in
|
Oops. I'd forgotten about that. Pull requests are always welcome! |
Well, it's not that easy as I thought. Have never used exceptions in c++ :) Solution involving a lot of #ifdefs around if/else blocks works, but not very nice. I can open pull request if you wish, but maybe there is a better way. |
Haha, don't worry about it :-) If you have something committed just post a link to it here and I'll take a look (I don't use exceptions very often in C++ either). I think I'll go with the MSVC approach of defining TRY and CATCH macros that boil down to the appropriate thing. |
I've pushed a commit that adds support for exceptions being disabled (under GCC and MSVC, but only tested with GCC). Hopefully that does the trick! |
…operator precedence for possible error; use parentheses to clarify precedence (cameron314#5) # Conflicts: # concurrentqueue.h
The queue should be resilient against exceptions thrown from element objects, without imposing any overhead for types that have
noexcept
constructors and assignment operators.It is reasonable to assume (and document) that destructors and iterators should never throw an exception.
The text was updated successfully, but these errors were encountered: