================
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -verify -std=c++23 %s -fsyntax-only
+
+struct S {}; // expected-note 2{{candidate constructor}}
+template <typename T> struct SS { T t1; T t2; };
+template <class T, class... Args> T C(Args... args) { return SS("foo"); } // 
expected-error {{no viable conversion}}
+S s = C<S>(); // expected-note {{in instantiation of function template 
specialization 'C<S>'}}
+
+template <class T> struct SS2 { T t1, t2; };
+template <class> void C2() {
+  SS2("foo"); // expected-warning 2{{expression result unused}}
----------------
zyn0217 wrote:

nit: (void)SS2("foo"); to avoid unnecssary warnings

https://github.com/llvm/llvm-project/pull/203715
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to