core/memory/move.hpp file

Functions cubos::core::memory::move and cubos::core::memory::forward.

Namespaces

namespace cubos
Cubos libraries namespace.
namespace cubos::core
Core namespace.
namespace cubos::core::memory
Memory module.

Classes

template<typename T>
struct cubos::core::memory::RemoveReference
Provides a type which is the same as the given type, but without any references.
template<typename T>
struct cubos::core::memory::IsLValueReference
Used to check if a type is an rvalue reference.

Functions

template<typename T>
auto move(T&& value) -> RemoveReference<T>::Type&& noexcept
Returns an R-value reference to the given value.
template<typename T>
auto forward(typename RemoveReference<T>::Type& argument) -> T&& noexcept
Used to cast a templated function parameter to the value category the caller used to pass it, which allows rvalues to be passed as rvalues and lvalues as lvalues.
template<typename T>
auto forward(typename RemoveReference<T>::Type&& argument) -> T&& noexcept
Used to cast a templated function parameter to the value category the caller used to pass it, which allows rvalues to be passed as rvalues and lvalues as lvalues.