Skip to content

Commit 3298c28

Browse files
committed
clang-format
1 parent 1de4654 commit 3298c28

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
@@ -108,8 +108,8 @@ class flat_multiset {
108108

109109
public:
110110
// [flat.multiset.cons], constructors
111-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset() noexcept(is_nothrow_default_constructible_v<_KeyContainer> &&
112-
is_nothrow_default_constructible_v<_Compare>)
111+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset() noexcept(
112+
is_nothrow_default_constructible_v<_KeyContainer> && is_nothrow_default_constructible_v<_Compare>)
113113
: __keys_(), __compare_() {}
114114

115115
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const flat_multiset&) = default;
@@ -134,9 +134,11 @@ class flat_multiset {
134134
# endif // _LIBCPP_HAS_EXCEPTIONS
135135
}
136136

137-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(const key_compare& __comp) : __keys_(), __compare_(__comp) {}
137+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(const key_compare& __comp)
138+
: __keys_(), __compare_(__comp) {}
138139

139-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(container_type __keys, const key_compare& __comp = key_compare())
140+
_LIBCPP_HIDE_FROM_ABI
141+
_LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(container_type __keys, const key_compare& __comp = key_compare())
140142
: __keys_(std::move(__keys)), __compare_(__comp) {
141143
ranges::sort(__keys_, __compare_);
142144
}
@@ -168,11 +170,14 @@ class flat_multiset {
168170
: flat_multiset(__fr, std::forward<_Range>(__rg), key_compare()) {}
169171

170172
template <_ContainerCompatibleRange<value_type> _Range>
171-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp) : flat_multiset(__comp) {
173+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
174+
flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp)
175+
: flat_multiset(__comp) {
172176
insert_range(std::forward<_Range>(__rg));
173177
}
174178

175-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
179+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
180+
flat_multiset(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
176181
: flat_multiset(__il.begin(), __il.end(), __comp) {}
177182

178183
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
@@ -186,12 +191,14 @@ class flat_multiset {
186191

187192
template <class _Allocator>
188193
requires uses_allocator<container_type, _Allocator>::value
189-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const key_compare& __comp, const _Allocator& __alloc)
194+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
195+
flat_multiset(const key_compare& __comp, const _Allocator& __alloc)
190196
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_(__comp) {}
191197

192198
template <class _Allocator>
193199
requires uses_allocator<container_type, _Allocator>::value
194-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const container_type& __keys, const _Allocator& __alloc)
200+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
201+
flat_multiset(const container_type& __keys, const _Allocator& __alloc)
195202
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_() {
196203
ranges::sort(__keys_, __compare_);
197204
}
@@ -206,7 +213,8 @@ class flat_multiset {
206213

207214
template <class _Allocator>
208215
requires uses_allocator<container_type, _Allocator>::value
209-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(sorted_equivalent_t, const container_type& __keys, const _Allocator& __alloc)
216+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
217+
flat_multiset(sorted_equivalent_t, const container_type& __keys, const _Allocator& __alloc)
210218
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_() {
211219
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys_, __compare_), "Key container is not sorted");
212220
}
@@ -221,7 +229,8 @@ class flat_multiset {
221229

222230
template <class _Allocator>
223231
requires uses_allocator<container_type, _Allocator>::value
224-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const flat_multiset& __other, const _Allocator& __alloc)
232+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
233+
flat_multiset(const flat_multiset& __other, const _Allocator& __alloc)
225234
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __other.__keys_)),
226235
__compare_(__other.__compare_) {}
227236

@@ -243,7 +252,8 @@ class flat_multiset {
243252

244253
template <class _InputIterator, class _Allocator>
245254
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
246-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
255+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
256+
flat_multiset(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
247257
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_() {
248258
insert(__first, __last);
249259
}
@@ -266,33 +276,36 @@ class flat_multiset {
266276

267277
template <class _InputIterator, class _Allocator>
268278
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
269-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
270-
flat_multiset(sorted_equivalent_t,
271-
_InputIterator __first,
272-
_InputIterator __last,
273-
const key_compare& __comp,
274-
const _Allocator& __alloc)
279+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(
280+
sorted_equivalent_t,
281+
_InputIterator __first,
282+
_InputIterator __last,
283+
const key_compare& __comp,
284+
const _Allocator& __alloc)
275285
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __first, __last)), __compare_(__comp) {
276286
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys_, __compare_), "Key container is not sorted");
277287
}
278288

279289
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
280290
requires uses_allocator<container_type, _Allocator>::value
281-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(from_range_t, _Range&& __rg, const _Allocator& __alloc)
291+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
292+
flat_multiset(from_range_t, _Range&& __rg, const _Allocator& __alloc)
282293
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_() {
283294
insert_range(std::forward<_Range>(__rg));
284295
}
285296

286297
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
287298
requires uses_allocator<container_type, _Allocator>::value
288-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp, const _Allocator& __alloc)
299+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
300+
flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp, const _Allocator& __alloc)
289301
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_(__comp) {
290302
insert_range(std::forward<_Range>(__rg));
291303
}
292304

293305
template <class _Allocator>
294306
requires uses_allocator<container_type, _Allocator>::value
295-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(initializer_list<value_type> __il, const _Allocator& __alloc)
307+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
308+
flat_multiset(initializer_list<value_type> __il, const _Allocator& __alloc)
296309
: flat_multiset(__il.begin(), __il.end(), __alloc) {}
297310

298311
template <class _Allocator>
@@ -303,7 +316,8 @@ class flat_multiset {
303316

304317
template <class _Allocator>
305318
requires uses_allocator<container_type, _Allocator>::value
306-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(sorted_equivalent_t, initializer_list<value_type> __il, const _Allocator& __alloc)
319+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
320+
flat_multiset(sorted_equivalent_t, initializer_list<value_type> __il, const _Allocator& __alloc)
307321
: flat_multiset(sorted_equivalent, __il.begin(), __il.end(), __alloc) {}
308322

309323
template <class _Allocator>
@@ -334,23 +348,45 @@ class flat_multiset {
334348
}
335349

336350
// iterators
337-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept { return iterator(std::as_const(__keys_).begin()); }
338-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept { return const_iterator(__keys_.begin()); }
339-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept { return iterator(std::as_const(__keys_).end()); }
340-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept { return const_iterator(__keys_.end()); }
351+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
352+
return iterator(std::as_const(__keys_).begin());
353+
}
354+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
355+
return const_iterator(__keys_.begin());
356+
}
357+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept {
358+
return iterator(std::as_const(__keys_).end());
359+
}
360+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
361+
return const_iterator(__keys_.end());
362+
}
341363

342-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
343-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); }
344-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
345-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); }
364+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept {
365+
return reverse_iterator(end());
366+
}
367+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
368+
return const_reverse_iterator(end());
369+
}
370+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept {
371+
return reverse_iterator(begin());
372+
}
373+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
374+
return const_reverse_iterator(begin());
375+
}
346376

347377
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept { return begin(); }
348378
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept { return end(); }
349-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); }
350-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); }
379+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
380+
return const_reverse_iterator(end());
381+
}
382+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
383+
return const_reverse_iterator(begin());
384+
}
351385

352386
// capacity
353-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept { return __keys_.empty(); }
387+
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept {
388+
return __keys_.empty();
389+
}
354390
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept { return __keys_.size(); }
355391
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept { return __keys_.max_size(); }
356392

@@ -377,7 +413,9 @@ class flat_multiset {
377413

378414
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const value_type& __x) { return emplace(__x); }
379415

380-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(value_type&& __x) { return emplace(std::move(__x)); }
416+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(value_type&& __x) {
417+
return emplace(std::move(__x));
418+
}
381419

382420
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, const value_type& __x) {
383421
return emplace_hint(__hint, __x);
@@ -398,7 +436,8 @@ class flat_multiset {
398436

399437
template <class _InputIterator>
400438
requires __has_input_iterator_category<_InputIterator>::value
401-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_equivalent_t, _InputIterator __first, _InputIterator __last) {
439+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
440+
insert(sorted_equivalent_t, _InputIterator __first, _InputIterator __last) {
402441
if constexpr (sized_sentinel_for<_InputIterator, _InputIterator>) {
403442
__reserve(__last - __first);
404443
}
@@ -415,9 +454,12 @@ class flat_multiset {
415454
__append_sort_merge</*WasSorted = */ false>(std::forward<_Range>(__range));
416455
}
417456

418-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) { insert(__il.begin(), __il.end()); }
457+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) {
458+
insert(__il.begin(), __il.end());
459+
}
419460

420-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_equivalent_t, initializer_list<value_type> __il) {
461+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
462+
insert(sorted_equivalent_t, initializer_list<value_type> __il) {
421463
insert(sorted_equivalent, __il.begin(), __il.end());
422464
}
423465

@@ -484,9 +526,13 @@ class flat_multiset {
484526
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare value_comp() const { return __compare_; }
485527

486528
// map operations
487-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) { return __find_impl(*this, __x); }
529+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) {
530+
return __find_impl(*this, __x);
531+
}
488532

489-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const { return __find_impl(*this, __x); }
533+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const {
534+
return __find_impl(*this, __x);
535+
}
490536

491537
template <class _Kp>
492538
requires __is_transparent_v<_Compare>
@@ -512,7 +558,9 @@ class flat_multiset {
512558
return __last - __first;
513559
}
514560

515-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const { return find(__x) != end(); }
561+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const {
562+
return find(__x) != end();
563+
}
516564

517565
template <class _Kp>
518566
requires __is_transparent_v<_Compare>
@@ -568,7 +616,8 @@ class flat_multiset {
568616
return __equal_range_impl(*this, __x);
569617
}
570618

571-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator> equal_range(const key_type& __x) const {
619+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
620+
equal_range(const key_type& __x) const {
572621
return __equal_range_impl(*this, __x);
573622
}
574623

@@ -579,20 +628,26 @@ class flat_multiset {
579628
}
580629
template <class _Kp>
581630
requires __is_transparent_v<_Compare>
582-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator> equal_range(const _Kp& __x) const {
631+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
632+
equal_range(const _Kp& __x) const {
583633
return __equal_range_impl(*this, __x);
584634
}
585635

586-
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator==(const flat_multiset& __x, const flat_multiset& __y) {
636+
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
637+
operator==(const flat_multiset& __x, const flat_multiset& __y) {
587638
return ranges::equal(__x, __y);
588639
}
589640

590-
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 auto operator<=>(const flat_multiset& __x, const flat_multiset& __y) {
641+
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 auto
642+
operator<=>(const flat_multiset& __x, const flat_multiset& __y) {
591643
return std::lexicographical_compare_three_way(
592644
__x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way);
593645
}
594646

595-
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void swap(flat_multiset& __x, flat_multiset& __y) noexcept { __x.swap(__y); }
647+
friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
648+
swap(flat_multiset& __x, flat_multiset& __y) noexcept {
649+
__x.swap(__y);
650+
}
596651

597652
private:
598653
template <bool _WasSorted, class... _Args>
@@ -673,15 +728,16 @@ class flat_multiset {
673728
}
674729

675730
template <class _Key2, class _Compare2, class _KeyContainer2, class _Predicate>
676-
friend typename flat_multiset<_Key2, _Compare2, _KeyContainer2>::size_type
677-
_LIBCPP_CONSTEXPR_SINCE_CXX26 erase_if(flat_multiset<_Key2, _Compare2, _KeyContainer2>&, _Predicate);
731+
friend typename flat_multiset<_Key2, _Compare2, _KeyContainer2>::size_type _LIBCPP_CONSTEXPR_SINCE_CXX26
732+
erase_if(flat_multiset<_Key2, _Compare2, _KeyContainer2>&, _Predicate);
678733

679734
_KeyContainer __keys_;
680735
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __compare_;
681736

682737
struct __key_equiv {
683738
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_equiv(key_compare __c) : __comp_(__c) {}
684-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator()(const_reference __x, const_reference __y) const {
739+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
740+
operator()(const_reference __x, const_reference __y) const {
685741
return !__comp_(std::get<0>(__x), std::get<0>(__y)) && !__comp_(std::get<0>(__y), std::get<0>(__x));
686742
}
687743
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)