Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/gcc/testsuite/g++.dg/modules/pr99283-7-swap.h
2023-03-06 14:48:14 +01:00

18 lines
469 B
C++

template<typename _Tp>
constexpr typename remove_reference<_Tp>::type&&
move(_Tp&& __t) noexcept;
template<typename _Tp>
constexpr inline
typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
is_move_constructible<_Tp>,
is_move_assignable<_Tp>>::value>::type
swap(_Tp& __a, _Tp& __b)
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
is_nothrow_move_assignable<_Tp>>::value)
{
_Tp __tmp = move(__a);
__a = move(__b);
__b = move(__tmp);
}