diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1y/lambda-generic-uneval1.C | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a16501a222d..937afa58a36 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-03-05 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/64834 + * g++.dg/cpp1y/lambda-generic-uneval1.C: New. + 2015-03-04 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/entry_queues3.adb: New test. diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-uneval1.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-uneval1.C new file mode 100644 index 00000000000..113eacf843c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-uneval1.C @@ -0,0 +1,17 @@ +// PR c++/64834 +// { dg-do compile { target c++14 } } + +template <typename F> +void e(F f) +{ + f(1); +} + +template <int I> +void bar() { + int x; + e([&] (const int& y) { (void)sizeof(x); }); + e([&] (const auto& y) { (void)sizeof(x); }); +} + +void baz() { bar<1>(); } |