// { dg-do compile { target c++17 } } // Bug 104606 comparison operator resolution with std::optional and -std=c++20 #include #include #include struct Value : std::variant> { }; struct Comparator { template bool operator<=(const T &) { return true; } }; std::optional o; Comparator c; auto x = c <= o;