4 ms·
move is just return static_cast<T&&>(value); Library support for std::move is not the reason it's disallowed. (If it is, that's just silly and someone sho
by reubenmorais 12y ago
move is just
return static_cast<T&&>(value);
Library support for std::move is not the reason it's disallowed. (If it is, that's just silly and someone should create a discussion thread).
- gtremper 12y agoIts more than that. You can't put move-only types into std:: containers if the target doesn't have a C++11 support. There are many other pitfalls like this that are hard to notice until you try it on a pre-C++11 target.
- reubenmorais 12y agoSupport for move semantics in library containers is a better reason for disallowing it, I'm just pointing out that std::move (and std::forward) is the simplest part of the puzzle.
- gtremper 12y agoWell, if the simplest part of the puzzle isn't implemented, then I doubt the rest of it is.