On Fri, Jul 09, 2021 at 04:18:34PM -0400, Patrick Palka via Gcc-patches wrote:
> > > > --- a/gcc/cp/name-lookup.c
> > > > +++ b/gcc/cp/name-lookup.c
> > > > @@ -7110,9 +7110,14 @@ lookup_qualified_name (tree scope, tree name,
> > > > LOOK_want want, bool complain)
> > > > else if (cxx_dialect != cxx98 && TREE_CODE (scope) == ENUMERAL_TYPE)
> > > > t = lookup_enumerator (scope, name);
> > > > else if (is_class_type (scope, complain))
> > > > - t = lookup_member (scope, name, 2, bool (want & LOOK_want::TYPE),
> > > > - tf_warning_or_error);
> > > > -
> > > > + {
> > > > + t = lookup_member (scope, name, 2, bool (want & LOOK_want::TYPE),
> > > > + tf_warning_or_error);
> > > > + if (t && dguide_name_p (name))
> > > > + /* Since class-scope deduction guides aren't really member
> > > > functions,
> > > > + don't use a BASELINK for them. */
> > > > + t = MAYBE_BASELINK_FUNCTIONS (t);
> > > > + }
>
> On second thought, this seems to be an awkward spot to do this
> adjustment. Maybe it's better to do it in lookup_member, or in
> deduction_guides_for (the only caller which really needs it)?
Yeah, doing it in deduction_guides_for sounds a bit better to me.
Marek