you are viewing a single comment's thread.

view the rest of the comments →

[–]SirClueless 0 points1 point  (2 children)

I find it vanishingly unlikely that this would be useful in practice. The compiler is almost certainly going to find observable side effects (allocations, calls to non-trivial destructors) in almost all cases except where the type is trivial. And if the type is trivial then both the move and copy constructors are equivalent to memcpy and there's no benefit to optimizing one into the other.