[Bug c++/95568] No CTAD with list initialization within requires-clause
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 18 22:56:34 GMT 2020
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;
More information about the Gcc-bugs
mailing list