Fix rejects-valid when referencing an implicit operator== from within a
templated class. When a defaulted operator<=> results in the injection of a defaulted operator==, that operator== can be named by unqualified name within the same class, even if the class is templated. To make this work, perform the transform from defaulted operator<=> to defaulted operator== in the template definition context instead of the template instantiation context. This results in our substituting into a declaration from a context where we don't have a full list of template arguments (or indeed any), for which we are now more careful to not spuriously instantiate declarations that are not dependent on the arguments we're substituting.
Loading
Please sign in to comment