refactor(typetraits): replaces template class type traits with concepts at all

This commit is contained in:
2022-05-20 23:35:36 +08:00
parent 6a5a101af4
commit ee46d84897
36 changed files with 292 additions and 554 deletions

View File

@ -77,7 +77,7 @@ constexpr void Swap(T& A, T& B)
}
}
template <typename T, typename U = T> requires CMoveConstructible<T> && CAssignable<T&, U>
template <typename T, typename U = T> requires CMoveConstructible<T> && CAssignableFrom<T&, U>
constexpr T Exchange(T& A, U&& B)
{
T Temp = MoveTemp(A);