News for hackers. Stuff that matters.
Re:Move in C++ without a std:move by sprocketz on Wednesday September 02, 2026 @10:51AM (#49537214)
My little trick is to think of them as "oh, I accidentally made an lvalue from an actual rvalue here because a name was introduced, so I need to cast (i.e move() or forward()) back to an rvalue again", that's why i have them as macros: MOVE_CAST and FORWARD_CAST defined as static_cast (also avoids blowing up compile times). I never think in terms of "moving this object".

There are no comments on this comment yet.