Suppose that there is such a function:
int * func() { std::unique_ptr<int> ptr(new int(3));
Is there a way to warn programmers to avoid such errors with std::move ? This is not only about unique_ptr , but also for other objects.
Is there any mechanism for generating an alert when we misused an object moved from ?
c ++ 11 move-semantics c ++ 14
gaurav bharadwaj
source share