Skip to content

Commit 935e035

Browse files
committed
[libc++] Introduce _LIBCPP_COMPRESSED_ELEMENT
1 parent 8b40a09 commit 935e035

File tree

5 files changed

+41
-227
lines changed

5 files changed

+41
-227
lines changed

libcxx/include/__memory/compressed_pair.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,24 @@ inline const size_t __compressed_pair_alignment<_Tp&> = _LIBCPP_ALIGNOF(void*);
6565

6666
template <class _ToPad,
6767
bool _Empty = ((is_empty<_ToPad>::value && !__libcpp_is_final<_ToPad>::value) ||
68-
is_reference<_ToPad>::value || sizeof(_ToPad) == __datasizeof_v<_ToPad>)>
69-
class __compressed_pair_padding {
68+
sizeof(_ToPad) == __datasizeof_v<_ToPad>)>
69+
class __compressed_pair_padding_impl {
7070
char __padding_[sizeof(_ToPad) - __datasizeof_v<_ToPad>] = {};
7171
};
7272

73+
template <class _ToPad>
74+
class __compressed_pair_padding_impl<_ToPad, true> {};
75+
76+
template <class _ToPad, bool _IsReference = is_reference<_ToPad>::value>
77+
class __compressed_pair_padding : __compressed_pair_padding_impl<_ToPad> {};
78+
7379
template <class _ToPad>
7480
class __compressed_pair_padding<_ToPad, true> {};
7581

82+
# define _LIBCPP_COMPRESSED_ELEMENT(T1, Initializer1) \
83+
_LIBCPP_NO_UNIQUE_ADDRESS T1 Initializer1; \
84+
_LIBCPP_NO_UNIQUE_ADDRESS ::std::__compressed_pair_padding<T1> _LIBCPP_CONCAT3(__padding_, __LINE__, _)
85+
7686
# define _LIBCPP_COMPRESSED_PAIR(T1, Initializer1, T2, Initializer2) \
7787
_LIBCPP_NO_UNIQUE_ADDRESS __attribute__((__aligned__(::std::__compressed_pair_alignment<T2>))) T1 Initializer1; \
7888
_LIBCPP_NO_UNIQUE_ADDRESS ::std::__compressed_pair_padding<T1> _LIBCPP_CONCAT3(__padding1_, __LINE__, _); \
@@ -90,6 +100,8 @@ class __compressed_pair_padding<_ToPad, true> {};
90100
_LIBCPP_NO_UNIQUE_ADDRESS ::std::__compressed_pair_padding<T3> _LIBCPP_CONCAT3(__padding3_, __LINE__, _)
91101

92102
#else
103+
# define _LIBCPP_COMPRESSED_ELEMENT(T1, Initializer1) _LIBCPP_NO_UNIQUE_ADDRESS T1 Initializer1
104+
93105
# define _LIBCPP_COMPRESSED_PAIR(T1, Name1, T2, Name2) \
94106
_LIBCPP_NO_UNIQUE_ADDRESS T1 Name1; \
95107
_LIBCPP_NO_UNIQUE_ADDRESS T2 Name2

libcxx/include/ext/hash_map

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -224,21 +224,9 @@ _LIBCPP_WARNING("Use of the header <ext/hash_map> is deprecated. Migrate to <un
224224

225225
namespace __gnu_cxx {
226226

227-
template <class _Tp, class _Hash, bool = std::is_empty<_Hash>::value && !std::__libcpp_is_final<_Hash>::value >
228-
class __hash_map_hasher : private _Hash {
229-
public:
230-
_LIBCPP_HIDE_FROM_ABI __hash_map_hasher() : _Hash() {}
231-
_LIBCPP_HIDE_FROM_ABI __hash_map_hasher(const _Hash& __h) : _Hash(__h) {}
232-
_LIBCPP_HIDE_FROM_ABI const _Hash& hash_function() const { return *this; }
233-
_LIBCPP_HIDE_FROM_ABI size_t operator()(const _Tp& __x) const { return static_cast<const _Hash&>(*this)(__x.first); }
234-
_LIBCPP_HIDE_FROM_ABI size_t operator()(const typename _Tp::first_type& __x) const {
235-
return static_cast<const _Hash&>(*this)(__x);
236-
}
237-
};
238-
239227
template <class _Tp, class _Hash>
240-
class __hash_map_hasher<_Tp, _Hash, false> {
241-
_Hash __hash_;
228+
class __hash_map_hasher {
229+
_LIBCPP_COMPRESSED_ELEMENT(_Hash, __hash_);
242230

243231
public:
244232
_LIBCPP_HIDE_FROM_ABI __hash_map_hasher() : __hash_() {}
@@ -248,30 +236,9 @@ public:
248236
_LIBCPP_HIDE_FROM_ABI size_t operator()(const typename _Tp::first_type& __x) const { return __hash_(__x); }
249237
};
250238

251-
template <class _Tp, class _Pred, bool = std::is_empty<_Pred>::value && !std::__libcpp_is_final<_Pred>::value >
252-
class __hash_map_equal : private _Pred {
253-
public:
254-
_LIBCPP_HIDE_FROM_ABI __hash_map_equal() : _Pred() {}
255-
_LIBCPP_HIDE_FROM_ABI __hash_map_equal(const _Pred& __p) : _Pred(__p) {}
256-
_LIBCPP_HIDE_FROM_ABI const _Pred& key_eq() const { return *this; }
257-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
258-
return static_cast<const _Pred&>(*this)(__x.first, __y.first);
259-
}
260-
_LIBCPP_HIDE_FROM_ABI bool operator()(const typename _Tp::first_type& __x, const _Tp& __y) const {
261-
return static_cast<const _Pred&>(*this)(__x, __y.first);
262-
}
263-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const typename _Tp::first_type& __y) const {
264-
return static_cast<const _Pred&>(*this)(__x.first, __y);
265-
}
266-
_LIBCPP_HIDE_FROM_ABI bool
267-
operator()(const typename _Tp::first_type& __x, const typename _Tp::first_type& __y) const {
268-
return static_cast<const _Pred&>(*this)(__x, __y);
269-
}
270-
};
271-
272239
template <class _Tp, class _Pred>
273-
class __hash_map_equal<_Tp, _Pred, false> {
274-
_Pred __pred_;
240+
class __hash_map_equal {
241+
_LIBCPP_COMPRESSED_ELEMENT(_Pred, __pred_);
275242

276243
public:
277244
_LIBCPP_HIDE_FROM_ABI __hash_map_equal() : __pred_() {}

libcxx/include/map

Lines changed: 5 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -633,47 +633,9 @@ _LIBCPP_PUSH_MACROS
633633

634634
_LIBCPP_BEGIN_NAMESPACE_STD
635635

636-
template <class _Key,
637-
class _CP,
638-
class _Compare,
639-
bool = is_empty<_Compare>::value && !__libcpp_is_final<_Compare>::value>
640-
class __map_value_compare : private _Compare {
641-
public:
642-
_LIBCPP_HIDE_FROM_ABI __map_value_compare() _NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value)
643-
: _Compare() {}
644-
_LIBCPP_HIDE_FROM_ABI __map_value_compare(_Compare __c) _NOEXCEPT_(is_nothrow_copy_constructible<_Compare>::value)
645-
: _Compare(__c) {}
646-
_LIBCPP_HIDE_FROM_ABI const _Compare& key_comp() const _NOEXCEPT { return *this; }
647-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _CP& __x, const _CP& __y) const {
648-
return static_cast<const _Compare&>(*this)(__x.__get_value().first, __y.__get_value().first);
649-
}
650-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _CP& __x, const _Key& __y) const {
651-
return static_cast<const _Compare&>(*this)(__x.__get_value().first, __y);
652-
}
653-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Key& __x, const _CP& __y) const {
654-
return static_cast<const _Compare&>(*this)(__x, __y.__get_value().first);
655-
}
656-
_LIBCPP_HIDE_FROM_ABI void swap(__map_value_compare& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Compare>) {
657-
using std::swap;
658-
swap(static_cast<_Compare&>(*this), static_cast<_Compare&>(__y));
659-
}
660-
661-
# if _LIBCPP_STD_VER >= 14
662-
template <typename _K2>
663-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _K2& __x, const _CP& __y) const {
664-
return static_cast<const _Compare&>(*this)(__x, __y.__get_value().first);
665-
}
666-
667-
template <typename _K2>
668-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _CP& __x, const _K2& __y) const {
669-
return static_cast<const _Compare&>(*this)(__x.__get_value().first, __y);
670-
}
671-
# endif
672-
};
673-
674636
template <class _Key, class _CP, class _Compare>
675-
class __map_value_compare<_Key, _CP, _Compare, false> {
676-
_Compare __comp_;
637+
class __map_value_compare {
638+
_LIBCPP_COMPRESSED_ELEMENT(_Compare, __comp_);
677639

678640
public:
679641
_LIBCPP_HIDE_FROM_ABI __map_value_compare() _NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value)
@@ -691,7 +653,7 @@ public:
691653
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Key& __x, const _CP& __y) const {
692654
return __comp_(__x, __y.__get_value().first);
693655
}
694-
void swap(__map_value_compare& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Compare>) {
656+
_LIBCPP_HIDE_FROM_ABI void swap(__map_value_compare& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Compare>) {
695657
using std::swap;
696658
swap(__comp_, __y.__comp_);
697659
}
@@ -709,9 +671,9 @@ public:
709671
# endif
710672
};
711673

712-
template <class _Key, class _CP, class _Compare, bool __b>
674+
template <class _Key, class _CP, class _Compare>
713675
inline _LIBCPP_HIDE_FROM_ABI void
714-
swap(__map_value_compare<_Key, _CP, _Compare, __b>& __x, __map_value_compare<_Key, _CP, _Compare, __b>& __y)
676+
swap(__map_value_compare<_Key, _CP, _Compare>& __x, __map_value_compare<_Key, _CP, _Compare>& __y)
715677
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
716678
__x.swap(__y);
717679
}

libcxx/include/tuple

Lines changed: 9 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ template <class... Types>
222222
# include <__fwd/pair.h>
223223
# include <__fwd/tuple.h>
224224
# include <__memory/allocator_arg_t.h>
225+
# include <__memory/compressed_pair.h>
225226
# include <__memory/uses_allocator.h>
226227
# include <__tuple/find_index.h>
227228
# include <__tuple/ignore.h>
@@ -287,25 +288,25 @@ _LIBCPP_BEGIN_NAMESPACE_STD
287288

288289
// __tuple_leaf
289290

290-
template <size_t _Ip, class _Hp, bool = is_empty<_Hp>::value && !__libcpp_is_final<_Hp>::value >
291+
template <size_t _Ip, class _Hp>
291292
class __tuple_leaf;
292293

293-
template <size_t _Ip, class _Hp, bool _Ep>
294+
template <size_t _Ip, class _Hp>
294295
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
295-
swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x, __tuple_leaf<_Ip, _Hp, _Ep>& __y) noexcept(__is_nothrow_swappable_v<_Hp>) {
296+
swap(__tuple_leaf<_Ip, _Hp>& __x, __tuple_leaf<_Ip, _Hp>& __y) noexcept(__is_nothrow_swappable_v<_Hp>) {
296297
swap(__x.get(), __y.get());
297298
}
298299

299-
template <size_t _Ip, class _Hp, bool _Ep>
300+
template <size_t _Ip, class _Hp>
300301
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
301-
swap(const __tuple_leaf<_Ip, _Hp, _Ep>& __x,
302-
const __tuple_leaf<_Ip, _Hp, _Ep>& __y) noexcept(__is_nothrow_swappable_v<const _Hp>) {
302+
swap(const __tuple_leaf<_Ip, _Hp>& __x,
303+
const __tuple_leaf<_Ip, _Hp>& __y) noexcept(__is_nothrow_swappable_v<const _Hp>) {
303304
swap(__x.get(), __y.get());
304305
}
305306

306-
template <size_t _Ip, class _Hp, bool>
307+
template <size_t _Ip, class _Hp>
307308
class __tuple_leaf {
308-
_Hp __value_;
309+
_LIBCPP_COMPRESSED_ELEMENT(_Hp, __value_);
309310

310311
template <class _Tp>
311312
static _LIBCPP_HIDE_FROM_ABI constexpr bool __can_bind_reference() {
@@ -390,63 +391,6 @@ public:
390391
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const _NOEXCEPT { return __value_; }
391392
};
392393

393-
template <size_t _Ip, class _Hp>
394-
class __tuple_leaf<_Ip, _Hp, true> : private __remove_cv_t<_Hp> {
395-
public:
396-
_LIBCPP_CONSTEXPR_SINCE_CXX14 __tuple_leaf& operator=(const __tuple_leaf&) = delete;
397-
398-
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf() noexcept(is_nothrow_default_constructible<_Hp>::value) {}
399-
400-
template <class _Alloc>
401-
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf(integral_constant<int, 0>, const _Alloc&) {}
402-
403-
template <class _Alloc>
404-
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a)
405-
: _Hp(allocator_arg_t(), __a) {}
406-
407-
template <class _Alloc>
408-
_LIBCPP_HIDE_FROM_ABI constexpr __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a) : _Hp(__a) {}
409-
410-
template <class _Tp,
411-
__enable_if_t< _And< _IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp> >::value,
412-
int> = 0>
413-
_LIBCPP_HIDE_FROM_ABI
414-
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __tuple_leaf(_Tp&& __t) noexcept(is_nothrow_constructible<_Hp, _Tp>::value)
415-
: _Hp(std::forward<_Tp>(__t)) {}
416-
417-
template <class _Tp, class _Alloc>
418-
_LIBCPP_HIDE_FROM_ABI constexpr explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
419-
: _Hp(std::forward<_Tp>(__t)) {}
420-
421-
template <class _Tp, class _Alloc>
422-
_LIBCPP_HIDE_FROM_ABI constexpr explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
423-
: _Hp(allocator_arg_t(), __a, std::forward<_Tp>(__t)) {}
424-
425-
template <class _Tp, class _Alloc>
426-
_LIBCPP_HIDE_FROM_ABI constexpr explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
427-
: _Hp(std::forward<_Tp>(__t), __a) {}
428-
429-
__tuple_leaf(__tuple_leaf const&) = default;
430-
__tuple_leaf(__tuple_leaf&&) = default;
431-
432-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int
433-
swap(__tuple_leaf& __t) noexcept(__is_nothrow_swappable_v<__tuple_leaf>) {
434-
std::swap(*this, __t);
435-
return 0;
436-
}
437-
438-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 int swap(const __tuple_leaf& __rhs) const
439-
noexcept(__is_nothrow_swappable_v<const __tuple_leaf>) {
440-
std::swap(*this, __rhs);
441-
return 0;
442-
}
443-
444-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Hp& get() _NOEXCEPT { return static_cast<_Hp&>(*this); }
445-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const _NOEXCEPT {
446-
return static_cast<const _Hp&>(*this);
447-
}
448-
};
449-
450394
template <class... _Tp>
451395
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swallow(_Tp&&...) _NOEXCEPT {}
452396

libcxx/include/unordered_map

Lines changed: 9 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -643,36 +643,9 @@ _LIBCPP_PUSH_MACROS
643643

644644
_LIBCPP_BEGIN_NAMESPACE_STD
645645

646-
template <class _Key,
647-
class _Cp,
648-
class _Hash,
649-
class _Pred,
650-
bool = is_empty<_Hash>::value && !__libcpp_is_final<_Hash>::value>
651-
class __unordered_map_hasher : private _Hash {
652-
public:
653-
_LIBCPP_HIDE_FROM_ABI __unordered_map_hasher() _NOEXCEPT_(is_nothrow_default_constructible<_Hash>::value) : _Hash() {}
654-
_LIBCPP_HIDE_FROM_ABI __unordered_map_hasher(const _Hash& __h) _NOEXCEPT_(is_nothrow_copy_constructible<_Hash>::value)
655-
: _Hash(__h) {}
656-
_LIBCPP_HIDE_FROM_ABI const _Hash& hash_function() const _NOEXCEPT { return *this; }
657-
_LIBCPP_HIDE_FROM_ABI size_t operator()(const _Cp& __x) const {
658-
return static_cast<const _Hash&>(*this)(__x.__get_value().first);
659-
}
660-
_LIBCPP_HIDE_FROM_ABI size_t operator()(const _Key& __x) const { return static_cast<const _Hash&>(*this)(__x); }
661-
# if _LIBCPP_STD_VER >= 20
662-
template <typename _K2>
663-
_LIBCPP_HIDE_FROM_ABI size_t operator()(const _K2& __x) const {
664-
return static_cast<const _Hash&>(*this)(__x);
665-
}
666-
# endif
667-
_LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_hasher& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Hash>) {
668-
using std::swap;
669-
swap(static_cast<_Hash&>(*this), static_cast<_Hash&>(__y));
670-
}
671-
};
672-
673646
template <class _Key, class _Cp, class _Hash, class _Pred>
674-
class __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, false> {
675-
_Hash __hash_;
647+
class __unordered_map_hasher {
648+
_LIBCPP_COMPRESSED_ELEMENT(_Hash, __hash_);
676649

677650
public:
678651
_LIBCPP_HIDE_FROM_ABI __unordered_map_hasher() _NOEXCEPT_(is_nothrow_default_constructible<_Hash>::value)
@@ -694,60 +667,16 @@ public:
694667
}
695668
};
696669

697-
template <class _Key, class _Cp, class _Hash, class _Pred, bool __b>
670+
template <class _Key, class _Cp, class _Hash, class _Pred>
698671
inline _LIBCPP_HIDE_FROM_ABI void
699-
swap(__unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __x,
700-
__unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __y) _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
672+
swap(__unordered_map_hasher<_Key, _Cp, _Hash, _Pred>& __x, __unordered_map_hasher<_Key, _Cp, _Hash, _Pred>& __y)
673+
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
701674
__x.swap(__y);
702675
}
703676

704-
template <class _Key,
705-
class _Cp,
706-
class _Pred,
707-
class _Hash,
708-
bool = is_empty<_Pred>::value && !__libcpp_is_final<_Pred>::value>
709-
class __unordered_map_equal : private _Pred {
710-
public:
711-
_LIBCPP_HIDE_FROM_ABI __unordered_map_equal() _NOEXCEPT_(is_nothrow_default_constructible<_Pred>::value) : _Pred() {}
712-
_LIBCPP_HIDE_FROM_ABI __unordered_map_equal(const _Pred& __p) _NOEXCEPT_(is_nothrow_copy_constructible<_Pred>::value)
713-
: _Pred(__p) {}
714-
_LIBCPP_HIDE_FROM_ABI const _Pred& key_eq() const _NOEXCEPT { return *this; }
715-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Cp& __x, const _Cp& __y) const {
716-
return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y.__get_value().first);
717-
}
718-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Cp& __x, const _Key& __y) const {
719-
return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y);
720-
}
721-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Key& __x, const _Cp& __y) const {
722-
return static_cast<const _Pred&>(*this)(__x, __y.__get_value().first);
723-
}
724-
# if _LIBCPP_STD_VER >= 20
725-
template <typename _K2>
726-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Cp& __x, const _K2& __y) const {
727-
return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y);
728-
}
729-
template <typename _K2>
730-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _K2& __x, const _Cp& __y) const {
731-
return static_cast<const _Pred&>(*this)(__x, __y.__get_value().first);
732-
}
733-
template <typename _K2>
734-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _Key& __x, const _K2& __y) const {
735-
return static_cast<const _Pred&>(*this)(__x, __y);
736-
}
737-
template <typename _K2>
738-
_LIBCPP_HIDE_FROM_ABI bool operator()(const _K2& __x, const _Key& __y) const {
739-
return static_cast<const _Pred&>(*this)(__x, __y);
740-
}
741-
# endif
742-
_LIBCPP_HIDE_FROM_ABI void swap(__unordered_map_equal& __y) _NOEXCEPT_(__is_nothrow_swappable_v<_Pred>) {
743-
using std::swap;
744-
swap(static_cast<_Pred&>(*this), static_cast<_Pred&>(__y));
745-
}
746-
};
747-
748677
template <class _Key, class _Cp, class _Pred, class _Hash>
749-
class __unordered_map_equal<_Key, _Cp, _Pred, _Hash, false> {
750-
_Pred __pred_;
678+
class __unordered_map_equal {
679+
_LIBCPP_COMPRESSED_ELEMENT(_Pred, __pred_);
751680

752681
public:
753682
_LIBCPP_HIDE_FROM_ABI __unordered_map_equal() _NOEXCEPT_(is_nothrow_default_constructible<_Pred>::value)
@@ -788,9 +717,9 @@ public:
788717
}
789718
};
790719

791-
template <class _Key, class _Cp, class _Pred, class _Hash, bool __b>
720+
template <class _Key, class _Cp, class _Pred, class _Hash>
792721
inline _LIBCPP_HIDE_FROM_ABI void
793-
swap(__unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __x, __unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __y)
722+
swap(__unordered_map_equal<_Key, _Cp, _Pred, _Hash>& __x, __unordered_map_equal<_Key, _Cp, _Pred, _Hash>& __y)
794723
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {
795724
__x.swap(__y);
796725
}

0 commit comments

Comments
 (0)