https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99599

--- Comment #22 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Here we go, this still fails on trunk, just by making the data member private:

template<typename T> class indirect {
public:
  template<typename U> requires // (!is_indirect<U>) &&
    requires (const T& t, const U& u) { t == u; }
  friend constexpr bool operator==(const indirect&, const U&) { return false; }

private:
  T* _M_ptr{};
};

indirect<int> i;
bool b = i == 1;

Reply via email to