Skip to content

Commit 9f18aa9

Browse files
committed
clang-format
1 parent f6299bb commit 9f18aa9

File tree

2 files changed

+105
-49
lines changed

2 files changed

+105
-49
lines changed

libcxx/include/__flat_set/flat_multiset.h

Lines changed: 103 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ class flat_multiset {
9494

9595
public:
9696
// [flat.multiset.cons], constructors
97-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset() noexcept(is_nothrow_default_constructible_v<_KeyContainer> &&
98-
is_nothrow_default_constructible_v<_Compare>)
97+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset() noexcept(
98+
is_nothrow_default_constructible_v<_KeyContainer> && is_nothrow_default_constructible_v<_Compare>)
9999
: __keys_(), __compare_() {}
100100

101101
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const flat_multiset&) = default;
@@ -120,9 +120,11 @@ class flat_multiset {
120120
# endif // _LIBCPP_HAS_EXCEPTIONS
121121
}
122122

123-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(const key_compare& __comp) : __keys_(), __compare_(__comp) {}
123+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(const key_compare& __comp)
124+
: __keys_(), __compare_(__comp) {}
124125

125-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(container_type __keys, const key_compare& __comp = key_compare())
126+
_LIBCPP_HIDE_FROM_ABI
127+
_LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(container_type __keys, const key_compare& __comp = key_compare())
126128
: __keys_(std::move(__keys)), __compare_(__comp) {
127129
ranges::sort(__keys_, __compare_);
128130
}
@@ -154,11 +156,14 @@ class flat_multiset {
154156
: flat_multiset(__fr, std::forward<_Range>(__rg), key_compare()) {}
155157

156158
template <_ContainerCompatibleRange<value_type> _Range>
157-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp) : flat_multiset(__comp) {
159+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
160+
flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp)
161+
: flat_multiset(__comp) {
158162
insert_range(std::forward<_Range>(__rg));
159163
}
160164

161-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
165+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
166+
flat_multiset(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
162167
: flat_multiset(__il.begin(), __il.end(), __comp) {}
163168

164169
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
@@ -172,12 +177,14 @@ class flat_multiset {
172177

173178
template <class _Allocator>
174179
requires uses_allocator<container_type, _Allocator>::value
175-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const key_compare& __comp, const _Allocator& __alloc)
180+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
181+
flat_multiset(const key_compare& __comp, const _Allocator& __alloc)
176182
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_(__comp) {}
177183

178184
template <class _Allocator>
179185
requires uses_allocator<container_type, _Allocator>::value
180-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const container_type& __keys, const _Allocator& __alloc)
186+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
187+
flat_multiset(const container_type& __keys, const _Allocator& __alloc)
181188
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_() {
182189
ranges::sort(__keys_, __compare_);
183190
}
@@ -192,7 +199,8 @@ class flat_multiset {
192199

193200
template <class _Allocator>
194201
requires uses_allocator<container_type, _Allocator>::value
195-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(sorted_equivalent_t, const container_type& __keys, const _Allocator& __alloc)
202+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
203+
flat_multiset(sorted_equivalent_t, const container_type& __keys, const _Allocator& __alloc)
196204
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_() {
197205
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys_, __compare_), "Key container is not sorted");
198206
}
@@ -207,7 +215,8 @@ class flat_multiset {
207215

208216
template <class _Allocator>
209217
requires uses_allocator<container_type, _Allocator>::value
210-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const flat_multiset& __other, const _Allocator& __alloc)
218+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
219+
flat_multiset(const flat_multiset& __other, const _Allocator& __alloc)
211220
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __other.__keys_)),
212221
__compare_(__other.__compare_) {}
213222

@@ -229,7 +238,8 @@ class flat_multiset {
229238

230239
template <class _InputIterator, class _Allocator>
231240
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
232-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
241+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
242+
flat_multiset(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
233243
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_() {
234244
insert(__first, __last);
235245
}
@@ -252,33 +262,36 @@ class flat_multiset {
252262

253263
template <class _InputIterator, class _Allocator>
254264
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
255-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
256-
flat_multiset(sorted_equivalent_t,
257-
_InputIterator __first,
258-
_InputIterator __last,
259-
const key_compare& __comp,
260-
const _Allocator& __alloc)
265+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(
266+
sorted_equivalent_t,
267+
_InputIterator __first,
268+
_InputIterator __last,
269+
const key_compare& __comp,
270+
const _Allocator& __alloc)
261271
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __first, __last)), __compare_(__comp) {
262272
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys_, __compare_), "Key container is not sorted");
263273
}
264274

265275
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
266276
requires uses_allocator<container_type, _Allocator>::value
267-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(from_range_t, _Range&& __rg, const _Allocator& __alloc)
277+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
278+
flat_multiset(from_range_t, _Range&& __rg, const _Allocator& __alloc)
268279
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_() {
269280
insert_range(std::forward<_Range>(__rg));
270281
}
271282

272283
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
273284
requires uses_allocator<container_type, _Allocator>::value
274-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp, const _Allocator& __alloc)
285+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
286+
flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp, const _Allocator& __alloc)
275287
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_(__comp) {
276288
insert_range(std::forward<_Range>(__rg));
277289
}
278290

279291
template <class _Allocator>
280292
requires uses_allocator<container_type, _Allocator>::value
281-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(initializer_list<value_type> __il, const _Allocator& __alloc)
293+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
294+
flat_multiset(initializer_list<value_type> __il, const _Allocator& __alloc)
282295
: flat_multiset(__il.begin(), __il.end(), __alloc) {}
283296

284297
template <class _Allocator>
@@ -289,7 +302,8 @@ class flat_multiset {
289302

290303
template <class _Allocator>
291304
requires uses_allocator<container_type, _Allocator>::value
292-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(sorted_equivalent_t, initializer_list<value_type> __il, const _Allocator& __alloc)
305+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
306+
flat_multiset(sorted_equivalent_t, initializer_list<value_type> __il, const _Allocator& __alloc)
293307
: flat_multiset(sorted_equivalent, __il.begin(), __il.end(), __alloc) {}
294308

295309
template <class _Allocator>
@@ -320,23 +334,45 @@ class flat_multiset {
320334
}
321335

322336
// iterators
323-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept { return iterator(std::as_const(__keys_).begin()); }
324-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept { return const_iterator(__keys_.begin()); }
325-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept { return iterator(std::as_const(__keys_).end()); }
326-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept { return const_iterator(__keys_.end()); }
337+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
338+
return iterator(std::as_const(__keys_).begin());
339+
}
340+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
341+
return const_iterator(__keys_.begin());
342+
}
343+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept {
344+
return iterator(std::as_const(__keys_).end());
345+
}
346+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
347+
return const_iterator(__keys_.end());
348+
}
327349

328-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
329-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); }
330-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
331-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); }
350+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept {
351+
return reverse_iterator(end());
352+
}
353+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
354+
return const_reverse_iterator(end());
355+
}
356+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept {
357+
return reverse_iterator(begin());
358+
}
359+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
360+
return const_reverse_iterator(begin());
361+
}
332362

333363
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept { return begin(); }
334364
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept { return end(); }
335-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); }
336-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); }
365+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
366+
return const_reverse_iterator(end());
367+
}
368+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
369+
return const_reverse_iterator(begin());
370+
}
337371

338372
// capacity
339-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept { return __keys_.empty(); }
373+
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept {
374+
return __keys_.empty();
375+
}
340376
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept { return __keys_.size(); }
341377
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept { return __keys_.max_size(); }
342378

@@ -363,7 +399,9 @@ class flat_multiset {
363399

364400
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const value_type& __x) { return emplace(__x); }
365401

366-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(value_type&& __x) { return emplace(std::move(__x)); }
402+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(value_type&& __x) {
403+
return emplace(std::move(__x));
404+
}
367405

368406
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, const value_type& __x) {
369407
return emplace_hint(__hint, __x);
@@ -384,7 +422,8 @@ class flat_multiset {
384422

385423
template <class _InputIterator>
386424
requires __has_input_iterator_category<_InputIterator>::value
387-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_equivalent_t, _InputIterator __first, _InputIterator __last) {
425+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
426+
insert(sorted_equivalent_t, _InputIterator __first, _InputIterator __last) {
388427
if constexpr (sized_sentinel_for<_InputIterator, _InputIterator>) {
389428
__reserve(__last - __first);
390429
}
@@ -401,9 +440,12 @@ class flat_multiset {
401440
__append_sort_merge</*WasSorted = */ false>(std::forward<_Range>(__range));
402441
}
403442

404-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) { insert(__il.begin(), __il.end()); }
443+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) {
444+
insert(__il.begin(), __il.end());
445+
}
405446

406-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_equivalent_t, initializer_list<value_type> __il) {
447+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
448+
insert(sorted_equivalent_t, initializer_list<value_type> __il) {
407449
insert(sorted_equivalent, __il.begin(), __il.end());
408450
}
409451

@@ -470,9 +512,13 @@ class flat_multiset {
470512
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare value_comp() const { return __compare_; }
471513

472514
// map operations
473-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) { return __find_impl(*this, __x); }
515+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) {
516+
return __find_impl(*this, __x);
517+
}
474518

475-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const { return __find_impl(*this, __x); }
519+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const {
520+
return __find_impl(*this, __x);
521+
}
476522

477523
template <class _Kp>
478524
requires __is_transparent_v<_Compare>
@@ -498,7 +544,9 @@ class flat_multiset {
498544
return __last - __first;
499545
}
500546

501-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const { return find(__x) != end(); }
547+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const {
548+
return find(__x) != end();
549+
}
502550

503551
template <class _Kp>
504552
requires __is_transparent_v<_Compare>
@@ -554,7 +602,8 @@ class flat_multiset {
554602
return __equal_range_impl(*this, __x);
555603
}
556604

557-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator> equal_range(const key_type& __x) const {
605+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
606+
equal_range(const key_type& __x) const {
558607
return __equal_range_impl(*this, __x);
559608
}
560609

@@ -565,20 +614,26 @@ class flat_multiset {
565614
}
566615
template <class _Kp>
567616
requires __is_transparent_v<_Compare>
568-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator> equal_range(const _Kp& __x) const {
617+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
618+
equal_range(const _Kp& __x) const {
569619
return __equal_range_impl(*this, __x);
570620
}
571621

572-
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator==(const flat_multiset& __x, const flat_multiset& __y) {
622+
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
623+
operator==(const flat_multiset& __x, const flat_multiset& __y) {
573624
return ranges::equal(__x, __y);
574625
}
575626

576-
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 auto operator<=>(const flat_multiset& __x, const flat_multiset& __y) {
627+
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 auto
628+
operator<=>(const flat_multiset& __x, const flat_multiset& __y) {
577629
return std::lexicographical_compare_three_way(
578630
__x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way);
579631
}
580632

581-
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void swap(flat_multiset& __x, flat_multiset& __y) noexcept { __x.swap(__y); }
633+
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
634+
swap(flat_multiset& __x, flat_multiset& __y) noexcept {
635+
__x.swap(__y);
636+
}
582637

583638
private:
584639
template <bool _WasSorted, class... _Args>
@@ -659,15 +714,16 @@ class flat_multiset {
659714
}
660715

661716
template <class _Key2, class _Compare2, class _KeyContainer2, class _Predicate>
662-
friend typename flat_multiset<_Key2, _Compare2, _KeyContainer2>::size_type
663-
_LIBCPP_CONSTEXPR_SINCE_CXX26 erase_if(flat_multiset<_Key2, _Compare2, _KeyContainer2>&, _Predicate);
717+
friend typename flat_multiset<_Key2, _Compare2, _KeyContainer2>::size_type _LIBCPP_CONSTEXPR_SINCE_CXX26
718+
erase_if(flat_multiset<_Key2, _Compare2, _KeyContainer2>&, _Predicate);
664719

665720
_KeyContainer __keys_;
666721
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __compare_;
667722

668723
struct __key_equiv {
669724
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_equiv(key_compare __c) : __comp_(__c) {}
670-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator()(const_reference __x, const_reference __y) const {
725+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
726+
operator()(const_reference __x, const_reference __y) const {
671727
return !__comp_(std::get<0>(__x), std::get<0>(__y)) && !__comp_(std::get<0>(__y), std::get<0>(__x));
672728
}
673729
key_compare __comp_;

libcxx/test/std/containers/container.adaptors/flat.multiset/flat.multiset.erasure/erase_if.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ constexpr M make(std::initializer_list<int> vals) {
4040
}
4141

4242
template <class M, class Pred>
43-
constexpr void test0(
44-
std::initializer_list<int> vals, Pred p, std::initializer_list<int> expected, std::size_t expected_erased_count) {
43+
constexpr void
44+
test0(std::initializer_list<int> vals, Pred p, std::initializer_list<int> expected, std::size_t expected_erased_count) {
4545
M s = make<M>(vals);
4646
ASSERT_SAME_TYPE(typename M::size_type, decltype(std::erase_if(s, p)));
4747
assert(expected_erased_count == std::erase_if(s, p));

0 commit comments

Comments
 (0)