-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Copyability of b2World
and other classes
#711
Comments
Box2D was mostly written before C++11, but I have started adding some C++11 keywords when it makes sense. This seems like a good change. |
Just |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a rather minor issue.
I accidentally tried to copy an instance of
b2World
, and got a warning from Clang (from-Wdeprecated
):b2_world.h:54:2: warning: definition of implicit copy constructor for 'b2World' is deprecated because it has a user-provided destructor [-Wdeprecated-copy-with-user-provided-dtor]
Is it supposed to be copyable? I think not, so the copy operations should be
=delete
d (or made private if you're supporting pre-C++11), but if yes, they should be=default
ed to silence the warning.The same applies to all other classes with custom destructors.
If you agree with the fix, I can make a PR (I just need to know if I should target C++98 or >=C++11).
The text was updated successfully, but these errors were encountered: