36 _to_move(std::move(to_move)) {
70 this->_to_move = std::move(
const_cast<MoveByCopy &
>(other)._to_move);
79 return std::move(_to_move);
Definition move_by_copy.h:19
T move_type
Wrapped type moved through copy-shaped APIs.
Definition move_by_copy.h:24
MoveByCopy(const MoveByCopy &other)
Copy by moving the stored object out of another wrapper.
Definition move_by_copy.h:51
MoveByCopy & operator=(MoveByCopy &&other)=default
Move-assign the wrapped object from another wrapper.
MoveByCopy & operator=(const MoveByCopy &other)
Copy-assign by moving the wrapped object out of the source wrapper.
Definition move_by_copy.h:69
MoveByCopy(move_type &&to_move)
Store a move-only value for transfer through copy-only call sites.
Definition move_by_copy.h:35
MoveByCopy(MoveByCopy &&other)=default
Move the stored object from another wrapper.
Contains utilities for moving objects by copying them.
Definition move_by_copy.h:13
MoveByCopy< T > const_cmove(const T &movable)
Copy-shape wrapper for moving from a const reference.
Definition move_by_copy.h:102
MoveByCopy< T > cmove(T &movable)
Copy a move-only value by moving from the source reference.
Definition move_by_copy.h:90