re PR c++/67655 ([concepts] expression constraints and variadic expansions)
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 26 Sep 2018 09:23:00 +0000 (09:23 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 26 Sep 2018 09:23:00 +0000 (09:23 +0000)
2018-09-26  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/67655
* g++.dg/concepts/pr67655.C: New.

From-SVN: r264638

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/concepts/pr67655.C [new file with mode: 0644]

index c96126cb14e3b08be749112aa178885ab8f8402f..903b8c7d0cdf53172809762e405d4f0a295f4030 100644 (file)
@@ -1,3 +1,8 @@
+2018-09-26  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/67655
+       * g++.dg/concepts/pr67655.C: New.
+
 2018-09-26  Thomas Quinot  <quinot@adacore.com>
 
        * gnat.dg/sso13.adb: New testcase.
diff --git a/gcc/testsuite/g++.dg/concepts/pr67655.C b/gcc/testsuite/g++.dg/concepts/pr67655.C
new file mode 100644 (file)
index 0000000..b155421
--- /dev/null
@@ -0,0 +1,20 @@
+// { dg-do compile { target c++11 } }
+// { dg-additional-options "-fconcepts" }
+
+template<class... Xs>                 
+void consume(Xs&&...) {}
+
+template<class... Xs>
+  struct A {
+    template<class... Ys>
+    requires requires(Ys... ys) {
+      consume(Xs{ys}...);
+    }
+  A(Ys&&... ys) {
+  }
+  A(int) {}
+};
+
+int main() {
+  A<int, double> a(55);
+}