https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95568
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> --- A patch I've been playing with --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -28767,7 +28767,11 @@ do_class_deduction (tree ptype, tree tmpl, tree init, } if (tree guide = maybe_aggr_guide (tmpl, init, args)) - cands = lookup_add (guide, cands); + { + if (dependent_type_p (TREE_TYPE (guide))) + return ptype; + cands = lookup_add (guide, cands); + } tree call = error_mark_node;