Skip to content

Commit 6d540b6

Browse files
committed
[libc++] P3379R1: Constrain 'std::expected' equality operators
1 parent 408b331 commit 6d540b6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

libcxx/test/std/utilities/expected/expected.void/equality/equality.other_expected.pass.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@
2323
template <class T1, class T2>
2424
concept CanCompare = requires(T1 t1, T2 t2) { t1 == t2; };
2525

26-
struct Foo{};
26+
struct Foo {};
2727
static_assert(!CanCompare<Foo, Foo>);
2828

2929
static_assert(CanCompare<std::expected<void, int>, std::expected<void, int>>);
3030
static_assert(CanCompare<std::expected<void, int>, std::expected<void, short>>);
3131

32-
// Note this is true because other overloads in expected<non-void> are unconstrained
33-
static_assert(CanCompare<std::expected<void, int>, std::expected<int, int>>);
34-
3532
constexpr bool test() {
3633
// x.has_value() && y.has_value()
3734
{

0 commit comments

Comments
 (0)