Bonxai icon indicating copy to clipboard operation
Bonxai copied to clipboard

Add a move constructor.

Open arjo129 opened this issue 1 year ago • 2 comments

This PR adds a move constructor. It is not ideal as I needed to modify the constness of some member variables. I think having a move constructor would actually be good for usability of the library. Closes #26.

arjo129 avatar Jun 11 '24 10:06 arjo129

you do NOT need to remove const to add move semantic.

You can just copy the fields, instead of moving them

facontidavide avatar Jun 12 '24 20:06 facontidavide

I think the issue is with move assignment. Not the move constructor. I could use const_cast if you would like but I'm not a fan of it.

arjo129 avatar Jun 12 '24 23:06 arjo129