return false;
}
- constexpr friend std::ptrdiff_t operator-(std::input_or_output_iterator auto const&,
+ friend constexpr std::ptrdiff_t operator-(std::input_or_output_iterator auto const&,
distance_apriori_sentinel const y) {
return -y.count_;
}
- constexpr friend std::ptrdiff_t operator-(distance_apriori_sentinel const x,
+ friend constexpr std::ptrdiff_t operator-(distance_apriori_sentinel const x,
std::input_or_output_iterator auto const&) {
return x.count_;
}
return false;
}
- constexpr friend std::ptrdiff_t operator-(std::input_or_output_iterator auto const&,
+ friend constexpr std::ptrdiff_t operator-(std::input_or_output_iterator auto const&,
distance_apriori_sentinel const y) {
return -y.count_;
}
- constexpr friend std::ptrdiff_t operator-(distance_apriori_sentinel const x,
+ friend constexpr std::ptrdiff_t operator-(distance_apriori_sentinel const x,
std::input_or_output_iterator auto const&) {
return x.count_;
}
return false;
}
- constexpr friend std::ptrdiff_t operator-(std::input_or_output_iterator auto const&,
+ friend constexpr std::ptrdiff_t operator-(std::input_or_output_iterator auto const&,
distance_apriori_sentinel const y) {
return -y.count_;
}
- constexpr friend std::ptrdiff_t operator-(distance_apriori_sentinel const x,
+ friend constexpr std::ptrdiff_t operator-(distance_apriori_sentinel const x,
std::input_or_output_iterator auto const&) {
return x.count_;
}
struct BeginFriendContiguousIterator {
int buff[8];
- constexpr friend ContiguousIter begin(const BeginFriendContiguousIterator &iter) {
+ friend constexpr ContiguousIter begin(const BeginFriendContiguousIterator &iter) {
return ContiguousIter(iter.buff);
}
};
constexpr explicit View(int start) : start_(start) {}
View(View&&) noexcept(IsNoexcept) = default;
View& operator=(View&&) noexcept(IsNoexcept) = default;
- constexpr friend int* begin(View& view) { return globalBuff + view.start_; }
- constexpr friend int* begin(View const& view) { return globalBuff + view.start_; }
- constexpr friend int* end(View&) { return globalBuff + 8; }
- constexpr friend int* end(View const&) { return globalBuff + 8; }
+ friend constexpr int* begin(View& view) { return globalBuff + view.start_; }
+ friend constexpr int* begin(View const& view) { return globalBuff + view.start_; }
+ friend constexpr int* end(View&) { return globalBuff + 8; }
+ friend constexpr int* end(View const&) { return globalBuff + 8; }
};
static_assert(std::ranges::view<View<true>>);
static_assert(std::ranges::view<View<false>>);
CopyableView(CopyableView const&) noexcept(IsNoexcept) = default;
CopyableView& operator=(CopyableView const&) noexcept(IsNoexcept) = default;
constexpr explicit CopyableView(int start) noexcept : start_(start) {}
- constexpr friend int* begin(CopyableView& view) { return globalBuff + view.start_; }
- constexpr friend int* begin(CopyableView const& view) { return globalBuff + view.start_; }
- constexpr friend int* end(CopyableView&) { return globalBuff + 8; }
- constexpr friend int* end(CopyableView const&) { return globalBuff + 8; }
+ friend constexpr int* begin(CopyableView& view) { return globalBuff + view.start_; }
+ friend constexpr int* begin(CopyableView const& view) { return globalBuff + view.start_; }
+ friend constexpr int* end(CopyableView&) { return globalBuff + 8; }
+ friend constexpr int* end(CopyableView const&) { return globalBuff + 8; }
};
static_assert(std::ranges::view<CopyableView<true>>);
static_assert(std::ranges::view<CopyableView<false>>);
struct Range {
int start_;
constexpr explicit Range(int start) noexcept : start_(start) {}
- constexpr friend int* begin(Range const& range) { return globalBuff + range.start_; }
- constexpr friend int* begin(Range& range) { return globalBuff + range.start_; }
- constexpr friend int* end(Range const&) { return globalBuff + 8; }
- constexpr friend int* end(Range&) { return globalBuff + 8; }
+ friend constexpr int* begin(Range const& range) { return globalBuff + range.start_; }
+ friend constexpr int* begin(Range& range) { return globalBuff + range.start_; }
+ friend constexpr int* end(Range const&) { return globalBuff + 8; }
+ friend constexpr int* end(Range&) { return globalBuff + 8; }
};
struct BorrowableRange {
int start_;
constexpr explicit BorrowableRange(int start) noexcept : start_(start) {}
- constexpr friend int* begin(BorrowableRange const& range) { return globalBuff + range.start_; }
- constexpr friend int* begin(BorrowableRange& range) { return globalBuff + range.start_; }
- constexpr friend int* end(BorrowableRange const&) { return globalBuff + 8; }
- constexpr friend int* end(BorrowableRange&) { return globalBuff + 8; }
+ friend constexpr int* begin(BorrowableRange const& range) { return globalBuff + range.start_; }
+ friend constexpr int* begin(BorrowableRange& range) { return globalBuff + range.start_; }
+ friend constexpr int* end(BorrowableRange const&) { return globalBuff + 8; }
+ friend constexpr int* end(BorrowableRange&) { return globalBuff + 8; }
};
template<>
inline constexpr bool std::ranges::enable_borrowed_range<BorrowableRange> = true;
constexpr ContiguousView(int* ptr) : ptr_(ptr) {}
constexpr ContiguousView(ContiguousView&&) = default;
constexpr ContiguousView& operator=(ContiguousView&&) = default;
- constexpr friend int* begin(ContiguousView& view) { return view.ptr_; }
- constexpr friend int* begin(ContiguousView const& view) { return view.ptr_; }
- constexpr friend sentinel_wrapper<int*> end(ContiguousView& view) {
+ friend constexpr int* begin(ContiguousView& view) { return view.ptr_; }
+ friend constexpr int* begin(ContiguousView const& view) { return view.ptr_; }
+ friend constexpr sentinel_wrapper<int*> end(ContiguousView& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
- constexpr friend sentinel_wrapper<int*> end(ContiguousView const& view) {
+ friend constexpr sentinel_wrapper<int*> end(ContiguousView const& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
};
struct CopyableView : std::ranges::view_base {
int *ptr_;
constexpr CopyableView(int* ptr) : ptr_(ptr) {}
- constexpr friend int* begin(CopyableView& view) { return view.ptr_; }
- constexpr friend int* begin(CopyableView const& view) { return view.ptr_; }
- constexpr friend sentinel_wrapper<int*> end(CopyableView& view) {
+ friend constexpr int* begin(CopyableView& view) { return view.ptr_; }
+ friend constexpr int* begin(CopyableView const& view) { return view.ptr_; }
+ friend constexpr sentinel_wrapper<int*> end(CopyableView& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
- constexpr friend sentinel_wrapper<int*> end(CopyableView const& view) {
+ friend constexpr sentinel_wrapper<int*> end(CopyableView const& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
};
constexpr ContiguousView(int* ptr) : ptr_(ptr) {}
constexpr ContiguousView(ContiguousView&&) = default;
constexpr ContiguousView& operator=(ContiguousView&&) = default;
- constexpr friend int* begin(ContiguousView& view) { return view.ptr_; }
- constexpr friend int* begin(ContiguousView const& view) { return view.ptr_; }
- constexpr friend sentinel_wrapper<int*> end(ContiguousView& view) {
+ friend constexpr int* begin(ContiguousView& view) { return view.ptr_; }
+ friend constexpr int* begin(ContiguousView const& view) { return view.ptr_; }
+ friend constexpr sentinel_wrapper<int*> end(ContiguousView& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
- constexpr friend sentinel_wrapper<int*> end(ContiguousView const& view) {
+ friend constexpr sentinel_wrapper<int*> end(ContiguousView const& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
};
struct CopyableView : std::ranges::view_base {
int *ptr_;
constexpr CopyableView(int* ptr) : ptr_(ptr) {}
- constexpr friend int* begin(CopyableView& view) { return view.ptr_; }
- constexpr friend int* begin(CopyableView const& view) { return view.ptr_; }
- constexpr friend sentinel_wrapper<int*> end(CopyableView& view) {
+ friend constexpr int* begin(CopyableView& view) { return view.ptr_; }
+ friend constexpr int* begin(CopyableView const& view) { return view.ptr_; }
+ friend constexpr sentinel_wrapper<int*> end(CopyableView& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
- constexpr friend sentinel_wrapper<int*> end(CopyableView const& view) {
+ friend constexpr sentinel_wrapper<int*> end(CopyableView const& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
};
struct SizedForwardView : std::ranges::view_base {
int *ptr_;
constexpr SizedForwardView(int* ptr) : ptr_(ptr) {}
- constexpr friend ForwardIter begin(SizedForwardView& view) { return ForwardIter(view.ptr_); }
- constexpr friend ForwardIter begin(SizedForwardView const& view) { return ForwardIter(view.ptr_); }
- constexpr friend sentinel_wrapper<ForwardIter> end(SizedForwardView& view) {
+ friend constexpr ForwardIter begin(SizedForwardView& view) { return ForwardIter(view.ptr_); }
+ friend constexpr ForwardIter begin(SizedForwardView const& view) { return ForwardIter(view.ptr_); }
+ friend constexpr sentinel_wrapper<ForwardIter> end(SizedForwardView& view) {
return sentinel_wrapper<ForwardIter>{ForwardIter(view.ptr_ + 8)};
}
- constexpr friend sentinel_wrapper<ForwardIter> end(SizedForwardView const& view) {
+ friend constexpr sentinel_wrapper<ForwardIter> end(SizedForwardView const& view) {
return sentinel_wrapper<ForwardIter>{ForwardIter(view.ptr_ + 8)};
}
};
struct SizedRandomAccessView : std::ranges::view_base {
int *ptr_;
constexpr SizedRandomAccessView(int* ptr) : ptr_(ptr) {}
- constexpr friend RandomAccessIter begin(SizedRandomAccessView& view) { return RandomAccessIter(view.ptr_); }
- constexpr friend RandomAccessIter begin(SizedRandomAccessView const& view) { return RandomAccessIter(view.ptr_); }
- constexpr friend sentinel_wrapper<RandomAccessIter> end(SizedRandomAccessView& view) {
+ friend constexpr RandomAccessIter begin(SizedRandomAccessView& view) { return RandomAccessIter(view.ptr_); }
+ friend constexpr RandomAccessIter begin(SizedRandomAccessView const& view) { return RandomAccessIter(view.ptr_); }
+ friend constexpr sentinel_wrapper<RandomAccessIter> end(SizedRandomAccessView& view) {
return sentinel_wrapper<RandomAccessIter>{RandomAccessIter(view.ptr_ + 8)};
}
- constexpr friend sentinel_wrapper<RandomAccessIter> end(SizedRandomAccessView const& view) {
+ friend constexpr sentinel_wrapper<RandomAccessIter> end(SizedRandomAccessView const& view) {
return sentinel_wrapper<RandomAccessIter>{RandomAccessIter(view.ptr_ + 8)};
}
};
constexpr ContiguousView(int* ptr) : ptr_(ptr) {}
constexpr ContiguousView(ContiguousView&&) = default;
constexpr ContiguousView& operator=(ContiguousView&&) = default;
- constexpr friend int* begin(ContiguousView& view) { return view.ptr_; }
- constexpr friend int* begin(ContiguousView const& view) { return view.ptr_; }
- constexpr friend sentinel_wrapper<int*> end(ContiguousView& view) {
+ friend constexpr int* begin(ContiguousView& view) { return view.ptr_; }
+ friend constexpr int* begin(ContiguousView const& view) { return view.ptr_; }
+ friend constexpr sentinel_wrapper<int*> end(ContiguousView& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
- constexpr friend sentinel_wrapper<int*> end(ContiguousView const& view) {
+ friend constexpr sentinel_wrapper<int*> end(ContiguousView const& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
};
struct CopyableView : std::ranges::view_base {
int *ptr_;
constexpr CopyableView(int* ptr = globalBuffer) : ptr_(ptr) {}
- constexpr friend int* begin(CopyableView& view) { return view.ptr_; }
- constexpr friend int* begin(CopyableView const& view) { return view.ptr_; }
- constexpr friend sentinel_wrapper<int*> end(CopyableView& view) {
+ friend constexpr int* begin(CopyableView& view) { return view.ptr_; }
+ friend constexpr int* begin(CopyableView const& view) { return view.ptr_; }
+ friend constexpr sentinel_wrapper<int*> end(CopyableView& view) {
return sentinel_wrapper<int*>{view.ptr_ + 4};
}
- constexpr friend sentinel_wrapper<int*> end(CopyableView const& view) {
+ friend constexpr sentinel_wrapper<int*> end(CopyableView const& view) {
return sentinel_wrapper<int*>{view.ptr_ + 4};
}
};
struct CopyableView : std::ranges::view_base {
int *ptr_;
constexpr CopyableView(int* ptr) : ptr_(ptr) {}
- constexpr friend int* begin(CopyableView& view) { return view.ptr_; }
- constexpr friend int* begin(CopyableView const& view) { return view.ptr_; }
- constexpr friend sentinel_wrapper<int*> end(CopyableView& view) {
+ friend constexpr int* begin(CopyableView& view) { return view.ptr_; }
+ friend constexpr int* begin(CopyableView const& view) { return view.ptr_; }
+ friend constexpr sentinel_wrapper<int*> end(CopyableView& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
- constexpr friend sentinel_wrapper<int*> end(CopyableView const& view) {
+ friend constexpr sentinel_wrapper<int*> end(CopyableView const& view) {
return sentinel_wrapper<int*>{view.ptr_ + 8};
}
};
struct SizedForwardView : std::ranges::view_base {
int *ptr_;
constexpr SizedForwardView(int* ptr) : ptr_(ptr) {}
- constexpr friend ForwardIter begin(SizedForwardView& view) { return ForwardIter(view.ptr_); }
- constexpr friend ForwardIter begin(SizedForwardView const& view) { return ForwardIter(view.ptr_); }
- constexpr friend sentinel_wrapper<ForwardIter> end(SizedForwardView& view) {
+ friend constexpr ForwardIter begin(SizedForwardView& view) { return ForwardIter(view.ptr_); }
+ friend constexpr ForwardIter begin(SizedForwardView const& view) { return ForwardIter(view.ptr_); }
+ friend constexpr sentinel_wrapper<ForwardIter> end(SizedForwardView& view) {
return sentinel_wrapper<ForwardIter>{ForwardIter(view.ptr_ + 8)};
}
- constexpr friend sentinel_wrapper<ForwardIter> end(SizedForwardView const& view) {
+ friend constexpr sentinel_wrapper<ForwardIter> end(SizedForwardView const& view) {
return sentinel_wrapper<ForwardIter>{ForwardIter(view.ptr_ + 8)};
}
};
constexpr ContiguousView(int start = 0) : start_(start) {}
constexpr ContiguousView(ContiguousView&&) = default;
constexpr ContiguousView& operator=(ContiguousView&&) = default;
- constexpr friend int* begin(ContiguousView& view) { return globalBuff + view.start_; }
- constexpr friend int* begin(ContiguousView const& view) { return globalBuff + view.start_; }
- constexpr friend int* end(ContiguousView&) { return globalBuff + 8; }
- constexpr friend int* end(ContiguousView const&) { return globalBuff + 8; }
+ friend constexpr int* begin(ContiguousView& view) { return globalBuff + view.start_; }
+ friend constexpr int* begin(ContiguousView const& view) { return globalBuff + view.start_; }
+ friend constexpr int* end(ContiguousView&) { return globalBuff + 8; }
+ friend constexpr int* end(ContiguousView const&) { return globalBuff + 8; }
};
struct CopyableView : std::ranges::view_base {
constexpr CopyableView(int start = 0) : start_(start) {}
constexpr CopyableView(CopyableView const&) = default;
constexpr CopyableView& operator=(CopyableView const&) = default;
- constexpr friend int* begin(CopyableView& view) { return globalBuff + view.start_; }
- constexpr friend int* begin(CopyableView const& view) { return globalBuff + view.start_; }
- constexpr friend int* end(CopyableView&) { return globalBuff + 8; }
- constexpr friend int* end(CopyableView const&) { return globalBuff + 8; }
+ friend constexpr int* begin(CopyableView& view) { return globalBuff + view.start_; }
+ friend constexpr int* begin(CopyableView const& view) { return globalBuff + view.start_; }
+ friend constexpr int* end(CopyableView&) { return globalBuff + 8; }
+ friend constexpr int* end(CopyableView const&) { return globalBuff + 8; }
};
using ForwardIter = forward_iterator<int*>;
constexpr ForwardView() = default;
constexpr ForwardView(ForwardView&&) = default;
constexpr ForwardView& operator=(ForwardView&&) = default;
- constexpr friend ForwardIter begin(ForwardView&) { return ForwardIter(globalBuff); }
- constexpr friend ForwardIter begin(ForwardView const&) { return ForwardIter(globalBuff); }
- constexpr friend ForwardIter end(ForwardView&) { return ForwardIter(globalBuff + 8); }
- constexpr friend ForwardIter end(ForwardView const&) { return ForwardIter(globalBuff + 8); }
+ friend constexpr ForwardIter begin(ForwardView&) { return ForwardIter(globalBuff); }
+ friend constexpr ForwardIter begin(ForwardView const&) { return ForwardIter(globalBuff); }
+ friend constexpr ForwardIter end(ForwardView&) { return ForwardIter(globalBuff + 8); }
+ friend constexpr ForwardIter end(ForwardView const&) { return ForwardIter(globalBuff + 8); }
};
struct ForwardRange {
constexpr ContiguousView(int* ptr = globalBuff, int start = 0) : start_(start), ptr_(ptr) {}
constexpr ContiguousView(ContiguousView&&) = default;
constexpr ContiguousView& operator=(ContiguousView&&) = default;
- constexpr friend int* begin(ContiguousView& view) { return view.ptr_ + view.start_; }
- constexpr friend int* begin(ContiguousView const& view) { return view.ptr_ + view.start_; }
- constexpr friend int* end(ContiguousView& view) { return view.ptr_ + 8; }
- constexpr friend int* end(ContiguousView const& view) { return view.ptr_ + 8; }
+ friend constexpr int* begin(ContiguousView& view) { return view.ptr_ + view.start_; }
+ friend constexpr int* begin(ContiguousView const& view) { return view.ptr_ + view.start_; }
+ friend constexpr int* end(ContiguousView& view) { return view.ptr_ + 8; }
+ friend constexpr int* end(ContiguousView const& view) { return view.ptr_ + 8; }
};
struct CopyableView : std::ranges::view_base {
constexpr CopyableView(int start = 0) : start_(start) {}
constexpr CopyableView(CopyableView const&) = default;
constexpr CopyableView& operator=(CopyableView const&) = default;
- constexpr friend int* begin(CopyableView& view) { return globalBuff + view.start_; }
- constexpr friend int* begin(CopyableView const& view) { return globalBuff + view.start_; }
- constexpr friend int* end(CopyableView&) { return globalBuff + 8; }
- constexpr friend int* end(CopyableView const&) { return globalBuff + 8; }
+ friend constexpr int* begin(CopyableView& view) { return globalBuff + view.start_; }
+ friend constexpr int* begin(CopyableView const& view) { return globalBuff + view.start_; }
+ friend constexpr int* end(CopyableView&) { return globalBuff + 8; }
+ friend constexpr int* end(CopyableView const&) { return globalBuff + 8; }
};
using ForwardIter = forward_iterator<int*>;
constexpr ForwardView(int* ptr = globalBuff) : ptr_(ptr) {}
constexpr ForwardView(ForwardView&&) = default;
constexpr ForwardView& operator=(ForwardView&&) = default;
- constexpr friend ForwardIter begin(ForwardView& view) { return ForwardIter(view.ptr_); }
- constexpr friend ForwardIter begin(ForwardView const& view) { return ForwardIter(view.ptr_); }
- constexpr friend ForwardIter end(ForwardView& view) { return ForwardIter(view.ptr_ + 8); }
- constexpr friend ForwardIter end(ForwardView const& view) { return ForwardIter(view.ptr_ + 8); }
+ friend constexpr ForwardIter begin(ForwardView& view) { return ForwardIter(view.ptr_); }
+ friend constexpr ForwardIter begin(ForwardView const& view) { return ForwardIter(view.ptr_); }
+ friend constexpr ForwardIter end(ForwardView& view) { return ForwardIter(view.ptr_ + 8); }
+ friend constexpr ForwardIter end(ForwardView const& view) { return ForwardIter(view.ptr_ + 8); }
};
using ForwardRange = test_common_range<forward_iterator>;
constexpr X(int i) : i_(i) {}
constexpr X(int i, int j) : i_(i), j_(j) {}
- constexpr friend bool operator==(const X& x, const X& y)
+ friend constexpr bool operator==(const X& x, const X& y)
{return x.i_ == y.i_ && x.j_ == y.j_;}
};
return *this;
}
- constexpr friend stride_counting_iterator operator+(stride_counting_iterator i, difference_type const n)
+ friend constexpr stride_counting_iterator operator+(stride_counting_iterator i, difference_type const n)
requires std::random_access_iterator<I>
{
return i += n;
}
- constexpr friend stride_counting_iterator operator+(difference_type const n, stride_counting_iterator i)
+ friend constexpr stride_counting_iterator operator+(difference_type const n, stride_counting_iterator i)
requires std::random_access_iterator<I>
{
return i += n;
}
- constexpr friend stride_counting_iterator operator-(stride_counting_iterator i, difference_type const n)
+ friend constexpr stride_counting_iterator operator-(stride_counting_iterator i, difference_type const n)
requires std::random_access_iterator<I>
{
return i -= n;
}
- constexpr friend difference_type operator-(stride_counting_iterator const& x, stride_counting_iterator const& y)
+ friend constexpr difference_type operator-(stride_counting_iterator const& x, stride_counting_iterator const& y)
requires std::sized_sentinel_for<I, I>
{
return x.base() - y.base();
return base_ == last;
}
- constexpr friend bool operator<(stride_counting_iterator const& x, stride_counting_iterator const& y)
+ friend constexpr bool operator<(stride_counting_iterator const& x, stride_counting_iterator const& y)
requires std::random_access_iterator<I>
{
return x.base_ < y.base_;
}
- constexpr friend bool operator>(stride_counting_iterator const& x, stride_counting_iterator const& y)
+ friend constexpr bool operator>(stride_counting_iterator const& x, stride_counting_iterator const& y)
requires std::random_access_iterator<I>
{
return y < x;
}
- constexpr friend bool operator<=(stride_counting_iterator const& x, stride_counting_iterator const& y)
+ friend constexpr bool operator<=(stride_counting_iterator const& x, stride_counting_iterator const& y)
requires std::random_access_iterator<I>
{
return !(y < x);
}
- constexpr friend bool operator>=(stride_counting_iterator const& x, stride_counting_iterator const& y)
+ friend constexpr bool operator>=(stride_counting_iterator const& x, stride_counting_iterator const& y)
requires std::random_access_iterator<I>
{
return !(x < y);
return *this;
}
- constexpr friend void swap(lvalue_adl_swappable& x,
+ friend constexpr void swap(lvalue_adl_swappable& x,
lvalue_adl_swappable& y) noexcept {
std::ranges::swap(x.value_, y.value_);
}
return *this;
}
- constexpr friend void swap(lvalue_rvalue_adl_swappable& x,
+ friend constexpr void swap(lvalue_rvalue_adl_swappable& x,
lvalue_rvalue_adl_swappable&& y) noexcept {
std::ranges::swap(x.value_, y.value_);
}
return *this;
}
- constexpr friend void swap(rvalue_lvalue_adl_swappable&& x,
+ friend constexpr void swap(rvalue_lvalue_adl_swappable&& x,
rvalue_lvalue_adl_swappable& y) noexcept {
std::ranges::swap(x.value_, y.value_);
}
return *this;
}
- constexpr friend void swap(rvalue_adl_swappable&& x,
+ friend constexpr void swap(rvalue_adl_swappable&& x,
rvalue_adl_swappable&& y) noexcept {
std::ranges::swap(x.value_, y.value_);
}
return *this;
}
- constexpr friend void swap(non_move_constructible_adl_swappable& x,
+ friend constexpr void swap(non_move_constructible_adl_swappable& x,
non_move_constructible_adl_swappable& y) noexcept {
std::ranges::swap(x.value_, y.value_);
}
constexpr non_move_assignable_adl_swappable&
operator=(non_move_assignable_adl_swappable&& other) noexcept = delete;
- constexpr friend void swap(non_move_assignable_adl_swappable& x,
+ friend constexpr void swap(non_move_assignable_adl_swappable& x,
non_move_assignable_adl_swappable& y) noexcept {
std::ranges::swap(x.value_, y.value_);
}
return *this;
}
- constexpr friend void swap(throwable_adl_swappable& X,
+ friend constexpr void swap(throwable_adl_swappable& X,
throwable_adl_swappable& Y) noexcept(false) {
std::ranges::swap(X.value_, Y.value_);
}