Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions include/stdx/atomic_bitset.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma once

#include <conc/atomic.hpp>

#include <stdx/bit.hpp>
#include <stdx/bitset.hpp>
#include <stdx/compiler.hpp>
Expand All @@ -11,6 +9,8 @@
#include <stdx/type_traits.hpp>
#include <stdx/udls.hpp>

#include <conc/atomic.hpp>

#include <algorithm>
#include <atomic>
#include <cstddef>
Expand Down
8 changes: 4 additions & 4 deletions include/stdx/rollover.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ template <typename T> struct rollover_t {
return not(lhs == rhs);
}

constexpr friend auto operator<(rollover_t, rollover_t) -> bool = delete;
constexpr friend auto operator<=(rollover_t, rollover_t) -> bool = delete;
constexpr friend auto operator>(rollover_t, rollover_t) -> bool = delete;
constexpr friend auto operator>=(rollover_t, rollover_t) -> bool = delete;
friend constexpr auto operator<(rollover_t, rollover_t) -> bool = delete;
friend constexpr auto operator<=(rollover_t, rollover_t) -> bool = delete;
friend constexpr auto operator>(rollover_t, rollover_t) -> bool = delete;
friend constexpr auto operator>=(rollover_t, rollover_t) -> bool = delete;

[[nodiscard]] constexpr friend auto cmp_less(rollover_t lhs, rollover_t rhs)
-> bool {
Expand Down
2 changes: 1 addition & 1 deletion include/stdx/tuple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ template <typename... Ts>
class one_of : public detail::tuple_impl<std::index_sequence_for<Ts...>,
detail::index_function_list<>, Ts...> {
template <typename T>
constexpr friend auto operator==(one_of const &lhs, T const &rhs) -> bool {
friend constexpr auto operator==(one_of const &lhs, T const &rhs) -> bool {
return lhs.apply(
[&](auto &&...args) { return ((args == rhs) || ...); });
}
Expand Down
2 changes: 1 addition & 1 deletion test/fail/tuple_equality_with_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// EXPECT: deleted

struct S {
constexpr friend auto operator==(S, S) -> bool = default;
friend constexpr auto operator==(S, S) -> bool = default;
};

auto main() -> int {
Expand Down
8 changes: 4 additions & 4 deletions test/optional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ enum struct E : std::uint8_t { VALUE, ALT_VALUE };

struct S {
constexpr explicit S(int i) : value{i} {}
constexpr friend auto operator==(S const &x, S const &y) -> bool {
friend constexpr auto operator==(S const &x, S const &y) -> bool {
return x.value == y.value;
}
constexpr friend auto operator<(S const &x, S const &y) -> bool {
friend constexpr auto operator<(S const &x, S const &y) -> bool {
return x.value < y.value;
}
int value{};
Expand Down Expand Up @@ -332,7 +332,7 @@ struct move_only {
constexpr move_only(int i) : value{i} {}
constexpr move_only(move_only &&) = default;
int value{};
constexpr friend auto operator==(move_only const &x, move_only const &y)
friend constexpr auto operator==(move_only const &x, move_only const &y)
-> bool {
return x.value == y.value;
}
Expand All @@ -342,7 +342,7 @@ struct non_movable {
constexpr non_movable(int i) : value{i} {}
constexpr non_movable(non_movable &&) = delete;
int value{};
constexpr friend auto operator==(non_movable const &x, non_movable const &y)
friend constexpr auto operator==(non_movable const &x, non_movable const &y)
-> bool {
return x.value == y.value;
}
Expand Down
2 changes: 1 addition & 1 deletion test/tuple_algorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ TEST_CASE("fold_left (heterogeneous types in fold)", "[tuple_algorithms]") {
}

template <auto N> struct addend {
constexpr friend auto operator==(addend, addend) -> bool { return true; }
friend constexpr auto operator==(addend, addend) -> bool { return true; }
};
template <auto X, auto Y> constexpr auto operator+(addend<X>, addend<Y>) {
return addend<X + Y>{};
Expand Down