diff --git a/libcxx/include/__functional/bind_back.h b/libcxx/include/__functional/bind_back.h index 71dc63c86bdbe..0dd2befb52409 100644 --- a/libcxx/include/__functional/bind_back.h +++ b/libcxx/include/__functional/bind_back.h @@ -43,14 +43,9 @@ struct __bind_back_t : __perfect_forward<__bind_back_op using __perfect_forward<__bind_back_op>, _Fn, _BoundArgs>::__perfect_forward; }; -template , _Fn>, - is_move_constructible>, - is_constructible, _Args>..., - is_move_constructible>... - >::value ->> +template + requires is_constructible_v, _Fn> && is_move_constructible_v> && + (is_constructible_v, _Args> && ...) && (is_move_constructible_v> && ...) _LIBCPP_HIDE_FROM_ABI constexpr auto __bind_back(_Fn&& __f, _Args&&... __args) noexcept(noexcept(__bind_back_t, tuple...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)))) diff --git a/libcxx/include/__functional/bind_front.h b/libcxx/include/__functional/bind_front.h index 72bb664809596..7ccd6e563b6e1 100644 --- a/libcxx/include/__functional/bind_front.h +++ b/libcxx/include/__functional/bind_front.h @@ -42,14 +42,9 @@ struct __bind_front_t : __perfect_forward<__bind_front_op, _Fn, _BoundArgs...> { using __perfect_forward<__bind_front_op, _Fn, _BoundArgs...>::__perfect_forward; }; -template , _Fn>, - is_move_constructible>, - is_constructible, _Args>..., - is_move_constructible>... - >::value ->> +template + requires is_constructible_v, _Fn> && is_move_constructible_v> && + (is_constructible_v, _Args> && ...) && (is_move_constructible_v> && ...) _LIBCPP_HIDE_FROM_ABI constexpr auto bind_front(_Fn&& __f, _Args&&... __args) { return __bind_front_t, decay_t<_Args>...>(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);