/* Substitute the deduced arguments plus the rewritten template
parameters into f to get g. This covers the type, copyness,
guideness, and explicit-specifier. */
- tree g = tsubst_decl (DECL_TEMPLATE_RESULT (f), targs, complain);
+ tree g;
+ {
+ /* Parms are to have DECL_CHAIN tsubsted, which would be skipped
+ if cp_unevaluated_operand. */
+ cp_evaluated ev;
+ g = tsubst_decl (DECL_TEMPLATE_RESULT (f), targs, complain);
+ }
if (g == error_mark_node)
continue;
DECL_USE_TEMPLATE (g) = 0;
--- /dev/null
+// PR c++/101233
+// { dg-do compile { target c++20 } }
+
+template<class T, class U>
+struct A { A(T, U); };
+
+template<class T, class U>
+using B = A<U, T>;
+
+using type = decltype(B{0, 0});