#include <Corrade/Containers/MoveReference.h>
template<class T>
MoveReference class new in Git master
Lightweight nonowning rvalue reference wrapper.
Contents
Counterpart to a Reference that accepts rvalue references. The main use case is to store rvalue references in a container — for example when an API needs to take a list of instances to take over ownership of. Use in a constexpr
context is not envisioned for this class and so compared to a Reference the class is not constexpr
.
This class is exclusively for rvalue references. If you want to accept only lvalue references, use a Reference; if you want to accept both, use an AnyReference.
Unlike a Reference, which corresponds to a std::
Constructors, destructors, conversion operators
 MoveReference(T&& reference) noexcept
 Constructor.
 MoveReference(T&) deleted
 Construction from lvalue references is not allowed.

template<class U, class = typename std::MoveReference(MoveReference<U> other) noexcept
enable_if <std::is_base_of <T, U>::value>::type>  Construct a reference from another of a derived type.
 operator T&() const
 Underlying reference.
Public functions
 auto get() const > T&
 Underlying reference.
 auto operator>() const > T*
 Access the underlying reference.
 auto operator*() const > T&
 Access the underlying reference.
Function documentation
template<class T>
Corrade::Containers::MoveReference<T>:: MoveReference(T&) deleted
Construction from lvalue references is not allowed.
A Reference can be created from lvalue references instead.
template<class T>
template<class U, class = typename std::enable_if <std::is_base_of <T, U>::value>::type>
Corrade::Containers::MoveReference<T>:: MoveReference(MoveReference<U> other) noexcept
Construct a reference from another of a derived type.
Expects that T
is a base of U
.
template<class T>
T* Corrade::Containers::MoveReference<T>:: operator>() const
Access the underlying reference.
template<class T>
T& Corrade::Containers::MoveReference<T>:: operator*() const
Access the underlying reference.
template<class T>
template<class T>
Utility::Debug & operator<<(Utility::Debug & debug,
MoveReference<T> value)
Debug output operator.