From efb6a9ced058948eba12683d9bba2249525b3551 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 20 Jan 2015 11:58:43 +0000 Subject: [PATCH] re PR c++/62241 (C++14 generalized lambda capture doesn't work with uniform initialization syntax.) 2015-01-20 Paolo Carlini PR c++/62241 * g++.dg/cpp1y/lambda-init12.C: New. From-SVN: r219890 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp1y/lambda-init12.C | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1y/lambda-init12.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8ef52c12e82..3af24f4255c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-20 Paolo Carlini + + PR c++/62241 + * g++.dg/cpp1y/lambda-init12.C: New. + 2015-01-20 Richard Biener 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 index 00000000000..97e90dd647f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init12.C @@ -0,0 +1,15 @@ +// PR c++/62241 +// { dg-do compile { target c++14 } } + +template +struct function +{ + template + function(Functor) { } +}; + +int main () +{ + int bar = 0; + function { [foo = bar] { } }; +} -- 2.30.2