any). */
enum { alias, inherited } ctad_kind;
- tree atype, fullatparms, utype;
+ tree atype, fullatparms, utype, name;
if (TREE_CODE (tmpl) == TEMPLATE_DECL)
{
ctad_kind = alias;
atype = TREE_TYPE (tmpl);
fullatparms = DECL_TEMPLATE_PARMS (tmpl);
utype = DECL_ORIGINAL_TYPE (DECL_TEMPLATE_RESULT (tmpl));
+ name = dguide_name (tmpl);
}
else
{
atype = NULL_TREE;
fullatparms = TREE_PURPOSE (tmpl);
utype = TREE_VALUE (tmpl);
+ name = dguide_name (TPARMS_PRIMARY_TEMPLATE
+ (INNERMOST_TEMPLATE_PARMS (fullatparms)));
}
tsubst_flags_t complain = tf_warning_or_error;
}
if (g == error_mark_node)
continue;
+ DECL_NAME (g) = name;
if (nfparms == 0)
{
/* The targs are all non-dependent, so g isn't a template. */
--- /dev/null
+// PR c++/115198
+// { dg-do compile { target c++20 } }
+
+template<bool B, class T>
+struct C {
+ C() = default;
+ C(const C&) = default;
+};
+
+template<class T>
+using A = C<false, T>;
+
+C<false, int> c;
+A a = c; // { dg-bogus "ambiguous" }