1 // { dg-do compile { target c++17 } }
3 // lambda in rewritten std::variant comparisons does not specify return type
8 operator bool() & { return val
; }
12 Bool t
{true}, f
{false};
15 Bool
& operator==(const A
&) const { return t
; }
16 Bool
& operator!=(const A
&) const { return f
; }
17 Bool
& operator<(const A
&) const { return f
; }
18 Bool
& operator>(const A
&) const { return f
; }
19 Bool
& operator<=(const A
&) const { return t
; }
20 Bool
& operator>=(const A
&) const { return t
; }
23 bool check_bool(bool);
24 template<typename T
> void check_bool(T
) = delete;
31 check_bool( !(v
!= v
) );
32 check_bool( !(v
< v
) );
33 check_bool( !(v
> v
) );