return error_mark_node;
}
+ /* Wait until the initializer is non-dependent. */
+ if (type_dependent_expression_p (init))
+ return ptype;
+
tree type = TREE_TYPE (tmpl);
bool try_list_ctor = false;
// PR c++/89565
// { dg-do compile { target c++20 } }
-// { dg-additional-options "-fchecking" }
-// { dg-ice "resolve_args" }
template <auto>
struct N{};
--- /dev/null
+// PR c++/99200
+// { dg-do compile { target c++20 } }
+
+template <int N>
+struct A
+{
+ constexpr A (const char (&s)[N]) { for (int i = 0; i < N; i++) v[i] = s[i]; v[N] = 0; }
+ char v[N + 1];
+};
+
+template <A s>
+struct B
+{
+ constexpr operator const char *() { return s.v; }
+};
+
+template <typename T>
+const char *
+foo ()
+{
+ return B<__PRETTY_FUNCTION__>{};
+}
+
+template <typename T>
+const char *
+bar ()
+{
+ return B<__FUNCTION__>{};
+}
+
+auto a = foo <int> ();
+auto b = bar <double> ();
--- /dev/null
+// PR c++/93383
+// { dg-do compile { target c++20 } }
+
+template <int> struct A {};
+
+template <A a> struct B {
+ void foo(B<+a>);
+ void bar(B<a.x>);
+ template <class T> using type = B<T{}>;
+ template <class> static inline auto y = A{0}; // { dg-error "deduction|no match" }
+};
--- /dev/null
+// PR c++/95291
+// { dg-do compile { target c++20 } }
+
+template <typename T = int>
+class xy { };
+
+template <xy _size>
+struct window_root { };
+
+template <typename minion>
+struct flip_horizontally : window_root<minion::size> { };
--- /dev/null
+// PR c++/99683
+// { dg-do compile { target c++20 } }
+
+template<auto V>
+struct nttp_tag {};
+
+template<typename T>
+struct type_tag {};
+
+
+/************************************************/
+template<bool is_type>
+struct use_ctad
+{
+ template<auto V> requires (!is_type)
+ constexpr use_ctad(nttp_tag<V>) {}
+};
+
+template<auto V>
+use_ctad(nttp_tag<V>) -> use_ctad<false>;
+
+/**********************************************/
+template<use_ctad t>
+struct wrapper
+{
+ template<typename Tag>
+ wrapper(Tag);
+};
+
+template<typename Tag>
+wrapper(Tag) -> wrapper<use_ctad{Tag()}>;
+
+int main()
+{
+ wrapper t{nttp_tag<42>{}};
+}