[libc++] constexpr flat_multimap#148417
Merged
frederick-vs-ja merged 4 commits intollvm:mainfrom Jul 19, 2025
Merged
Conversation
Member
|
@llvm/pr-subscribers-libcxx Author: Hui (huixie90) ChangesPatch is 265.23 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/148417.diff 65 Files Affected:
diff --git a/libcxx/include/__flat_map/flat_multimap.h b/libcxx/include/__flat_map/flat_multimap.h
index 0af6aac00c383..260d93ed25785 100644
--- a/libcxx/include/__flat_map/flat_multimap.h
+++ b/libcxx/include/__flat_map/flat_multimap.h
@@ -114,11 +114,12 @@ class flat_multimap {
class value_compare {
private:
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __comp_;
- _LIBCPP_HIDE_FROM_ABI value_compare(key_compare __c) : __comp_(__c) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare(key_compare __c) : __comp_(__c) {}
friend flat_multimap;
public:
- _LIBCPP_HIDE_FROM_ABI bool operator()(const_reference __x, const_reference __y) const {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
+ operator()(const_reference __x, const_reference __y) const {
return __comp_(__x.first, __y.first);
}
};
@@ -137,17 +138,17 @@ class flat_multimap {
public:
// [flat.map.cons], construct/copy/destroy
- _LIBCPP_HIDE_FROM_ABI flat_multimap() noexcept(
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap() noexcept(
is_nothrow_default_constructible_v<_KeyContainer> && is_nothrow_default_constructible_v<_MappedContainer> &&
is_nothrow_default_constructible_v<_Compare>)
: __containers_(), __compare_() {}
- _LIBCPP_HIDE_FROM_ABI flat_multimap(const flat_multimap&) = default;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(const flat_multimap&) = default;
// The copy/move constructors are not specified in the spec, which means they should be defaulted.
// However, the move constructor can potentially leave a moved-from object in an inconsistent
// state if an exception is thrown.
- _LIBCPP_HIDE_FROM_ABI flat_multimap(flat_multimap&& __other) noexcept(
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(flat_multimap&& __other) noexcept(
is_nothrow_move_constructible_v<_KeyContainer> && is_nothrow_move_constructible_v<_MappedContainer> &&
is_nothrow_move_constructible_v<_Compare>)
# if _LIBCPP_HAS_EXCEPTIONS
@@ -168,7 +169,8 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(const flat_multimap& __other, const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(const flat_multimap& __other, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_tag{},
__alloc,
__other.__containers_.keys,
@@ -177,7 +179,7 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(flat_multimap&& __other, const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(flat_multimap&& __other, const _Allocator& __alloc)
# if _LIBCPP_HAS_EXCEPTIONS
try
# endif // _LIBCPP_HAS_EXCEPTIONS
@@ -194,7 +196,7 @@ class flat_multimap {
# endif // _LIBCPP_HAS_EXCEPTIONS
}
- _LIBCPP_HIDE_FROM_ABI flat_multimap(
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
key_container_type __key_cont, mapped_container_type __mapped_cont, const key_compare& __comp = key_compare())
: __containers_{.keys = std::move(__key_cont), .values = std::move(__mapped_cont)}, __compare_(__comp) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
@@ -204,7 +206,7 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
const key_container_type& __key_cont, const mapped_container_type& __mapped_cont, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
@@ -214,22 +216,22 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI
- flat_multimap(const key_container_type& __key_cont,
- const mapped_container_type& __mapped_cont,
- const key_compare& __comp,
- const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
+ const key_container_type& __key_cont,
+ const mapped_container_type& __mapped_cont,
+ const key_compare& __comp,
+ const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont, __comp) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
"flat_multimap keys and mapped containers have different size");
__sort();
}
- _LIBCPP_HIDE_FROM_ABI
- flat_multimap(sorted_equivalent_t,
- key_container_type __key_cont,
- mapped_container_type __mapped_cont,
- const key_compare& __comp = key_compare())
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
+ sorted_equivalent_t,
+ key_container_type __key_cont,
+ mapped_container_type __mapped_cont,
+ const key_compare& __comp = key_compare())
: __containers_{.keys = std::move(__key_cont), .values = std::move(__mapped_cont)}, __compare_(__comp) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
"flat_multimap keys and mapped containers have different size");
@@ -238,11 +240,11 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI
- flat_multimap(sorted_equivalent_t,
- const key_container_type& __key_cont,
- const mapped_container_type& __mapped_cont,
- const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
+ sorted_equivalent_t,
+ const key_container_type& __key_cont,
+ const mapped_container_type& __mapped_cont,
+ const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
"flat_multimap keys and mapped containers have different size");
@@ -251,33 +253,35 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI
- flat_multimap(sorted_equivalent_t,
- const key_container_type& __key_cont,
- const mapped_container_type& __mapped_cont,
- const key_compare& __comp,
- const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
+ sorted_equivalent_t,
+ const key_container_type& __key_cont,
+ const mapped_container_type& __mapped_cont,
+ const key_compare& __comp,
+ const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont, __comp) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
"flat_multimap keys and mapped containers have different size");
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(__is_sorted(__containers_.keys), "Key container is not sorted");
}
- _LIBCPP_HIDE_FROM_ABI explicit flat_multimap(const key_compare& __comp) : __containers_(), __compare_(__comp) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multimap(const key_compare& __comp)
+ : __containers_(), __compare_(__comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(const key_compare& __comp, const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(const key_compare& __comp, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI explicit flat_multimap(const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multimap(const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc) {}
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(_InputIterator __first, _InputIterator __last, const key_compare& __comp = key_compare())
: __containers_(), __compare_(__comp) {
insert(__first, __last);
@@ -285,7 +289,7 @@ class flat_multimap {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(_InputIterator __first, _InputIterator __last, const key_compare& __comp, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {
insert(__first, __last);
@@ -293,91 +297,99 @@ class flat_multimap {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI flat_multimap(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc) {
insert(__first, __last);
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(from_range_t __fr, _Range&& __rg)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(from_range_t __fr, _Range&& __rg)
: flat_multimap(__fr, std::forward<_Range>(__rg), key_compare()) {}
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(from_range_t, _Range&& __rg, const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(from_range_t, _Range&& __rg, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc) {
insert_range(std::forward<_Range>(__rg));
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(from_range_t, _Range&& __rg, const key_compare& __comp) : flat_multimap(__comp) {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(from_range_t, _Range&& __rg, const key_compare& __comp)
+ : flat_multimap(__comp) {
insert_range(std::forward<_Range>(__rg));
}
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(from_range_t, _Range&& __rg, const key_compare& __comp, const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(from_range_t, _Range&& __rg, const key_compare& __comp, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {
insert_range(std::forward<_Range>(__rg));
}
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI flat_multimap(
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
sorted_equivalent_t, _InputIterator __first, _InputIterator __last, const key_compare& __comp = key_compare())
: __containers_(), __compare_(__comp) {
insert(sorted_equivalent, __first, __last);
}
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI
- flat_multimap(sorted_equivalent_t,
- _InputIterator __first,
- _InputIterator __last,
- const key_compare& __comp,
- const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
+ sorted_equivalent_t,
+ _InputIterator __first,
+ _InputIterator __last,
+ const key_compare& __comp,
+ const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {
insert(sorted_equivalent, __first, __last);
}
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(sorted_equivalent_t, _InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc) {
insert(sorted_equivalent, __first, __last);
}
- _LIBCPP_HIDE_FROM_ABI flat_multimap(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: flat_multimap(__il.begin(), __il.end(), __comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(initializer_list<value_type> __il, const key_compare& __comp, const _Allocator& __alloc)
: flat_multimap(__il.begin(), __il.end(), __comp, __alloc) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(initializer_list<value_type> __il, const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(initializer_list<value_type> __il, const _Allocator& __alloc)
: flat_multimap(__il.begin(), __il.end(), __alloc) {}
- _LIBCPP_HIDE_FROM_ABI
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(sorted_equivalent_t, initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: flat_multimap(sorted_equivalent, __il.begin(), __il.end(), __comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
sorted_equivalent_t, initializer_list<value_type> __il, const key_compare& __comp, const _Allocator& __alloc)
: flat_multimap(sorted_equivalent, __il.begin(), __il.end(), __comp, __alloc) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI flat_multimap(sorted_equivalent_t, initializer_list<value_type> __il, const _Allocator& __alloc)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(sorted_equivalent_t, initializer_list<value_type> __il, const _Allocator& __alloc)
: flat_multimap(sorted_equivalent, __il.begin(), __il.end(), __alloc) {}
- _LIBCPP_HIDE_FROM_ABI flat_multimap& operator=(initializer_list<value_type> __il) {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap& operator=(initializer_list<value_type> __il) {
clear();
insert(__il);
return *this;
@@ -386,9 +398,9 @@ class flat_multimap {
// copy/move assignment are not specified in the spec (defaulted)
// but move assignment can potentially leave moved from object in an inconsistent
// state if an exception is thrown
- _LIBCPP_HIDE_FROM_ABI flat_multimap& operator=(const flat_multimap&) = default;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap& operator=(const flat_multimap&) = default;
- _LIBCPP_HIDE_FROM_ABI flat_multimap& operator=(flat_multimap&& __other) noexcept(
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap& operator=(flat_multimap&& __other) noexcept(
is_nothrow_move_assignable_v<_KeyContainer> && is_nothrow_move_assignable_v<_MappedContainer> &&
is_nothrow_move_assignable_v<_Compare>) {
auto __clear_other_guard = std::__make_scope_guard([&]() noexcept { __other.clear() /* noexcept */; });
@@ -400,38 +412,54 @@ class flat_multimap {
}
// iterators
- _LIBCPP_HIDE_FROM_ABI iterator begin() noexcept {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
return iterator(__containers_.keys.begin(), __containers_.values.begin());
}
- _LIBCPP_HIDE_FROM_ABI const_iterator begin() const noexcept {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
return const_iterator(__containers_.keys.begin(), __containers_.values.begin());
}
- _LIBCPP_HIDE_FROM_ABI iterator end() noexcept {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept {
return iterator(__containers_.keys.end(), __containers_.values.end());
}
- _LIBCPP_HIDE_FROM_ABI const_iterator end() const noexcept {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
return const_iterator(__containers_.keys.end(), __containers_.values.end());
}
- _LIBCPP_HIDE_FROM_ABI reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
- _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); }
- _LIBCPP_HIDE_FROM_ABI reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
- _LIBCPP_HIDE_FROM_ABI const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept {
+ return reverse_iterator(end());
+ }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
+ return const_reverse_iterator(end());
+ }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept {
+ return reverse_iterator(begin());
+ }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
+ return const_reverse_iterator(begin());
+ }
- _LIBCPP_HIDE_FROM_ABI const_iterator cbegin() const noexcept { return begin(); }
- _LIBCPP_HIDE_FROM_ABI const_iterator cend() const noexcept { return end(); }
- _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); }
- _LIBCPP_HIDE_FROM_ABI const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept { return begin(); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept { return end(); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
+ return const_reverse_iterator(end());
+ }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
+ return const_reverse_iterator(begin());
+ }
// [flat.map.capacity], capacity
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool empty() const noexcept { return __containers_.keys.empty(); }
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept {
+ return __containers_.keys.empty();
+ }
- _LIBCPP_HIDE_FROM_ABI size_type size() const noexcept { return __containers_.keys.size(); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept {
+ return __containers_.keys.size();
+ }
- _LIBCPP_HIDE_FROM_ABI size_type max_size() const noexcept {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept {
return std::min<size_type>...
[truncated]
|
Contributor
|
CI failures look unrelated. Perhaps we should rebase the branch. |
ldionne
reviewed
Jul 15, 2025
Member
ldionne
left a comment
There was a problem hiding this comment.
Thanks for the patch! I have a few questions and nitpicks, but this mostly LGTM.
...xx/test/std/containers/container.adaptors/flat.multimap/flat.multimap.capacity/size.pass.cpp
Outdated
Show resolved
Hide resolved
...std/containers/container.adaptors/flat.multimap/flat.multimap.cons/sorted_container.pass.cpp
Outdated
Show resolved
Hide resolved
...std/containers/container.adaptors/flat.multimap/flat.multimap.cons/sorted_container.pass.cpp
Outdated
Show resolved
Hide resolved
...tainers/container.adaptors/flat.multimap/flat.multimap.modifiers/insert_transparent.pass.cpp
Outdated
Show resolved
Hide resolved
51f87d5 to
45de5a0
Compare
45de5a0 to
117914c
Compare
frederick-vs-ja
approved these changes
Jul 19, 2025
This was referenced Jul 23, 2025
mahesh-attarde
pushed a commit
to mahesh-attarde/llvm-project
that referenced
this pull request
Jul 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #128674