Move Semantic

Why user-defined move-constructor disables the implicit copy-constructor?

If you declare move members (which legacy C++ code can’t do), then we’re going to assume that the default copy members are likely to do the wrong thing. Opt-in (with =default) if you want them. Or write them yourself. Otherwise they are implicitly deleted.

Written on June 14, 2018, Last update on June 14, 2018
c++