File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -85,12 +85,12 @@ class _LIBCPP_NO_SPECIALIZATIONS indirect {
8585 _LIBCPP_HIDE_FROM_ABI constexpr indirect (indirect&& __other) noexcept
8686 : __alloc_(std::move(__other.__alloc_)), __ptr_(std::exchange(__other.__ptr_, nullptr )) {}
8787
88- _LIBCPP_HIDE_FROM_ABI constexpr indirect (allocator_arg_t , const _Allocator& __a, indirect&& __other) noexcept
89- requires allocator_traits<_Allocator>::is_always_equal::value
90- : __alloc_(__a), __ptr_(std::exchange(__other.__ptr_, nullptr )) {}
91-
92- _LIBCPP_HIDE_FROM_ABI constexpr indirect ( allocator_arg_t , const _Allocator& __a, indirect&& __other) : __alloc_(__a) {
93- if (__other.valueless_after_move ()) {
88+ _LIBCPP_HIDE_FROM_ABI constexpr indirect (allocator_arg_t , const _Allocator& __a, indirect&& __other) noexcept (
89+ allocator_traits<_Allocator>::is_always_equal::value)
90+ : __alloc_(__a) {
91+ if constexpr (allocator_traits<_Allocator>::is_always_equal::value) {
92+ __ptr_ = std::exchange (__other. __ptr_ , nullptr );
93+ } else if (__other.valueless_after_move ()) {
9494 __ptr_ = nullptr ;
9595 } else if (__alloc_ == __other.__alloc_ ) {
9696 __ptr_ = std::exchange (__other.__ptr_ , nullptr );
You can’t perform that action at this time.
0 commit comments