diff --git a/noexcept_traits.hh b/noexcept_traits.hh index 7888356ef6..d72bce7408 100644 --- a/noexcept_traits.hh +++ b/noexcept_traits.hh @@ -39,11 +39,12 @@ // T val2 = traits::unwrap(f.get0()); // -template +template struct noexcept_movable; template -struct noexcept_movable::value>> { +requires std::is_nothrow_move_constructible_v +struct noexcept_movable { using type = T; static type wrap(T&& v) { @@ -64,7 +65,8 @@ struct noexcept_movable -struct noexcept_movable::value>> { +requires (!std::is_nothrow_move_constructible_v) +struct noexcept_movable { using type = std::unique_ptr; static type wrap(T&& v) {