xieite::cp_rref<>

Defined in header <xieite/trait/cp_rref.hpp>

Copies the rvalue reference of one type to another.


Declaration

template<typename T, typename U>
using cp_rref = xieite::set_rref<xieite::is_rref<T>, U>;


Example

static_assert(std::same_as<xieite::cp_rref<int, int>, int>);
static_assert(std::same_as<xieite::cp_rref<int, int&>, int&>);
static_assert(std::same_as<xieite::cp_rref<int, int&&>, int>);
static_assert(std::same_as<xieite::cp_rref<int&, int>, int>);
static_assert(std::same_as<xieite::cp_rref<int&, int&>, int&>);
static_assert(std::same_as<xieite::cp_rref<int&, int&&>, int>);
static_assert(std::same_as<xieite::cp_rref<int&&, int>, int&&>);
static_assert(std::same_as<xieite::cp_rref<int&&, int&>, int&&>);
static_assert(std::same_as<xieite::cp_rref<int&&, int&&>, int&&>);
[View in Compiler Explorer]