diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-05 08:48:22 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-05 08:48:22 +0000 |
commit | 9ec5a8cc2a00616b569c3fdc3da86ecad8872d6c (patch) | |
tree | 92b8a7d066ba48f2706d81c0c08698ba4fe8c219 | |
parent | 6b1460deb360c711fa1ec42bfcf8386eaa4cad0e (diff) | |
download | gcc-9ec5a8cc2a00616b569c3fdc3da86ecad8872d6c.tar.gz |
2015-03-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/64834
* g++.dg/cpp1y/lambda-generic-uneval1.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221205 138bc75d-0d04-0410-961f-82ee72b054a4
-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>(); } |