re PR c++/62241 (C++14 generalized lambda capture doesn't work with uniform initializ...
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 20 Jan 2015 11:58:43 +0000 (11:58 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 20 Jan 2015 11:58:43 +0000 (11:58 +0000)
2015-01-20  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/62241
* g++.dg/cpp1y/lambda-init12.C: New.

From-SVN: r219890

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/lambda-init12.C [new file with mode: 0644]

index 8ef52c12e82ccf0a6dc08980b1b001cdec18a33a..3af24f4255cb06fa5212d125bd60b82fc73521ab 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/62241
+       * g++.dg/cpp1y/lambda-init12.C: New.
+
 2015-01-20  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/64410
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init12.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init12.C
new file mode 100644 (file)
index 0000000..97e90dd
--- /dev/null
@@ -0,0 +1,15 @@
+// PR c++/62241
+// { dg-do compile { target c++14 } }
+
+template<typename Signature>
+struct function
+{
+  template<typename Functor>
+  function(Functor) { }
+};
+
+int main ()
+{
+  int bar = 0;
+  function<void ()> { [foo = bar] { } };
+}