================
@@ -29,6 +29,35 @@ namespace std {
 #endif
 } // namespace std
 
+namespace cwg2707 { // cwg2707: 20
+
+#if __cplusplus >= 202002L
+
+template <class T, unsigned N> struct A { // #cwg2707-A
+  T value[N];
+};
+
+template <typename... T>
+A(T...) -> A<int, sizeof...(T)> requires (sizeof...(T) == 2); // 
#cwg2707-guide-A
+
+// Brace elision is not allowed for synthesized CTAD guides if the array size
+// is value-dependent.
+// So this should pick up our explicit deduction guide.
+A a = {1, 2};
+
+A b = {3, 4, 5};
+// since-cxx20-error@-1 {{no viable constructor or deduction guide}} \
----------------
Endilll wrote:

```suggestion
// since-cxx20-error@-1 {{no viable constructor or deduction guide}}
```
I don't think that backslashes are needed.

https://github.com/llvm/llvm-project/pull/110842
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to