Skip to content

[container] unify to friend constexpr (there were few constexpr friends) (EDITORIAL) #8053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2403,7 +2403,7 @@
noexcept(ator_traits::propagate_on_container_swap::value ||
ator_traits::is_always_equal::value);

constexpr friend void swap(@\placeholdernc{node-handle}@& x, @\placeholdernc{node-handle}@& y) noexcept(noexcept(x.swap(y))) {
friend constexpr void swap(@\placeholdernc{node-handle}@& x, @\placeholdernc{node-handle}@& y) noexcept(noexcept(x.swap(y))) {
x.swap(y);
}
};
Expand Down Expand Up @@ -10913,11 +10913,11 @@
is_nothrow_move_constructible_v<T>));
constexpr void clear() noexcept;

constexpr friend bool operator==(const inplace_vector& x,
friend constexpr bool operator==(const inplace_vector& x,
const inplace_vector& y);
constexpr friend @\exposid{synth-three-way-result}@<T>
friend constexpr @\exposid{synth-three-way-result}@<T>
operator<=>(const inplace_vector& x, const inplace_vector& y);
constexpr friend void swap(inplace_vector& x, inplace_vector& y)
friend constexpr void swap(inplace_vector& x, inplace_vector& y)
noexcept(N == 0 || (is_nothrow_swappable_v<T> &&
is_nothrow_move_constructible_v<T>))
{ x.swap(y); }
Expand Down Expand Up @@ -17330,12 +17330,12 @@
template<class K>
constexpr pair<const_iterator, const_iterator> equal_range(const K& x) const;

constexpr friend bool operator==(const flat_map& x, const flat_map& y);
friend constexpr bool operator==(const flat_map& x, const flat_map& y);

constexpr friend @\exposid{synth-three-way-result}@<value_type>
friend constexpr @\exposid{synth-three-way-result}@<value_type>
operator<=>(const flat_map& x, const flat_map& y);

constexpr friend void swap(flat_map& x, flat_map& y) noexcept
friend constexpr void swap(flat_map& x, flat_map& y) noexcept
{ x.swap(y); }

private:
Expand Down Expand Up @@ -18494,12 +18494,12 @@
template<class K>
constexpr pair<const_iterator, const_iterator> equal_range(const K& x) const;

constexpr friend bool operator==(const flat_multimap& x, const flat_multimap& y);
friend constexpr bool operator==(const flat_multimap& x, const flat_multimap& y);

constexpr friend @\exposid{synth-three-way-result}@<value_type>
friend constexpr @\exposid{synth-three-way-result}@<value_type>
operator<=>(const flat_multimap& x, const flat_multimap& y);

constexpr friend void swap(flat_multimap& x, flat_multimap& y) noexcept
friend constexpr void swap(flat_multimap& x, flat_multimap& y) noexcept
{ x.swap(y); }

private:
Expand Down Expand Up @@ -19097,12 +19097,12 @@
template<class K>
constexpr pair<const_iterator, const_iterator> equal_range(const K& x) const;

constexpr friend bool operator==(const flat_set& x, const flat_set& y);
friend constexpr bool operator==(const flat_set& x, const flat_set& y);

constexpr friend @\placeholder{synth-three-way-result}@<value_type>
friend constexpr @\placeholder{synth-three-way-result}@<value_type>
operator<=>(const flat_set& x, const flat_set& y);

constexpr friend void swap(flat_set& x, flat_set& y) noexcept { x.swap(y); }
friend constexpr void swap(flat_set& x, flat_set& y) noexcept { x.swap(y); }

private:
container_type @\exposidnc{c}@; // \expos
Expand Down Expand Up @@ -19768,12 +19768,12 @@
template<class K>
constexpr pair<const_iterator, const_iterator> equal_range(const K& x) const;

constexpr friend bool operator==(const flat_multiset& x, const flat_multiset& y);
friend constexpr bool operator==(const flat_multiset& x, const flat_multiset& y);

friend @\placeholder{synth-three-way-result}@<value_type>
constexpr operator<=>(const flat_multiset& x, const flat_multiset& y);

constexpr friend void swap(flat_multiset& x, flat_multiset& y) noexcept
friend constexpr void swap(flat_multiset& x, flat_multiset& y) noexcept
{ x.swap(y); }

private:
Expand Down