-
Notifications
You must be signed in to change notification settings - Fork 285
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
MeshBase move constructor can't be safely defaulted #2732
MeshBase move constructor can't be safely defaulted #2732
Conversation
Hmm yeah I see the problem, but I hate having yet another copy/paste maintenance issue in mesh_base.C to go along with the copy constructor. Is there any way that we can just delete the move constructor for now? I suppose if we found that we were spending a lot of time copying meshes we could look into implementing it... |
Though the issues with #2710 means that we won't be able to store |
Ugh I suppose I can just continue to operate with |
Well I'm OK either way. If you promise to maintain the hand-coded MeshBase move ctor :) |
I also vote for @lindsayad to be in charge of maintaining the move constructor. |
If I come up with a convincing reason to have a move constructor beyond programming laziness (which would actually incur real run-time expense since moving a unique_ptr is trivial), then I will add the implementation back |
7384b04
to
58bcd7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely fixes potential bugs, so seems like it should be cherry-picked onto 1.6.0.
This is because of the way we construct the `BoundaryInfo` member. Using the default move constructor, our `BoundaryInfo` in the move-constructed object will have an invalid reference to its `_mesh` member after the move constructor method is finished
merge conflict sad. Oooo I keep the approval though! I like that |
58bcd7f
to
681e9ad
Compare
The MeshBase move constructor can't be safely defaulted because of the way we construct the `BoundaryInfo` member. Using the default move constructor, our `BoundaryInfo` in the move-constructed object will have an invalid reference to its `_mesh` member after the move constructor method is finished Also remove the Mesh move constructor unit test that we had previously. This is a combination of the following two commits cherry-picked from master: 4a48915 681e9ad Refs #2732
This is because of the way we construct the
BoundaryInfo
member. Usingthe default move constructor, our
BoundaryInfo
in the move-constructedobject will have an invalid reference to its
_mesh
member after theother_mesh
is destructed.