Hacker News new | ask | show | jobs
by omegalulw 1367 days ago
> I've been using C++ since 1993. I still don't understand how I've written all this code and never once found myself using, or wishing I could use std::move.

No offense, but are you using modern C++? One of the most common uses of std::move is around ownership transfer of std::unique_ptr - most moderately big projects will have those. Other uses are around preventing copies, etc but those need more thought since you may actually cause regressions by getting in the compiler's way.

1 comments

Well, "modern" is relative. We just recently moved to C++11 :)

We do not use unique_ptr and to be honest I can find little to no use for it anywhere in our 600k lines of C++.

With apologies to Oscar Wilde: I spent all morning putting in std::unique_ptr and all afternoon taking it out again.