kharon4/surrealRT

Common memory copy constructor issue

Closed this issue · 1 comments

Common memory constructor currently makes the reference unusable, hence write different constructor for rValues and lValues.

In realese mode MSVC makes optimization copy elision that removes the need for move constructor. Hence move constructor only works in debug mode.

https://stackoverflow.com/questions/13099603/c11-move-constructor-not-called-default-constructor-preferred