ΒΆtemplate <class T>
inline constexpr decltype(auto) move(
    T&& t) noexcept

Description

Cast `t` to an r-value reference so that it can be used to construct or be assigned to a (non-reference) object of type `T`. `move()` requires that `t` can be moved from, so it requires that `t` is non-const. This differs from `std::move()`. The `move()` call itself does nothing to `t`, as it is just a cast, similar to `std::move()`. It enables an lvalue (a named object) to be used as an rvalue. The function does not require `T` to be `Move`, in order to call rvalue-qualified methods on `T` even if it is not `Move`.

Declared at: sus/mem/move.h:84

Templates

T

Parameters

T&& t