xieite ::set_rref <>
Defined in header <xieite/trait/set_rref.hpp>
Conditionally adds or removes the rvalue reference from a type.
Declaration
template <bool qual ,typename T >using set_rref =std ::conditional_t <qual ,xieite ::add_rref <xieite ::rm_ref <T >>,xieite ::rm_rref <T >>;
Example
[View in Compiler Explorer]static_assert (std ::same_as <xieite ::set_rref <true ,int >,int&& >);static_assert (std ::same_as <xieite ::set_rref <false ,int >,int >);static_assert (std ::same_as <xieite ::set_rref <true ,int&& >,int&& >);static_assert (std ::same_as <xieite ::set_rref <false ,int&& >,int >);