-
Notifications
You must be signed in to change notification settings - Fork 57
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
Mark move ctors/assignment and swap noexcept #43
Comments
I think this is fixed with commit 3c20f17 on the develop branch. You don't happen to have test code for the noexcept behavior? |
Thanks. No, I don't have a test. In my code base I just had a connection object as a member of a class, which prevented that class from having While we're at it, could you also mark default constructors |
I've added marked more connection constructors noexcept in commit fb300ad |
Thanks again. In my current code base with rather modest use of Boost.Signals2 the signal's default constructor doesn't matter. I was under impression that it contains a few pointers internally, which could be initialized to null or something like that. If it does something more complex that can throw, then surely marking it would not be a good idea. |
In connection and signal classes, move constructors/assignment and
swap
are not markednoexcept
, which prevents the user's types that have objects of these types as members to havenoexcept
constructors/assignment. It also prevents optimizations in standard library containers.The text was updated successfully, but these errors were encountered: