return !err;
}
+static tree alias_ctad_tweaks (tree, tree);
+
/* Return a C++20 aggregate deduction candidate for TYPE initialized from
INIT. */
if (init == NULL_TREE)
return NULL_TREE;
+ if (DECL_ALIAS_TEMPLATE_P (tmpl))
+ {
+ tree under = DECL_ORIGINAL_TYPE (DECL_TEMPLATE_RESULT (tmpl));
+ tree tinfo = get_template_info (under);
+ if (tree guide = maybe_aggr_guide (TI_TEMPLATE (tinfo), init, args))
+ return alias_ctad_tweaks (tmpl, guide);
+ return NULL_TREE;
+ }
+
/* We might be creating a guide for a class member template, e.g.,
template<typename U> struct A {
--- /dev/null
+// PR c++/98832
+// { dg-do compile { target c++20 } }
+
+template<class T, class U> struct X { U u; };
+template<class T> using Y = X<int, T>;
+Y y{0};