https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99599
--- Comment #25 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It looks like PR 104606 is another case.
#include <optional>
#include <variant>
#include <vector>
struct Value : public std::variant<std::vector<Value>> { };
struct Comparator {
template <typename T>
bool operator<=(const T &rhs)
{
return true;
}
};
int main()
{
auto test2 = Comparator() <= std::optional<Value>{};
}
Preprocessing this with 10.4 and compiling with 11.1 fails, bisection shows it
started to fail with r11-2774.