Commit 637e43b8 by Paolo Carlini Committed by Paolo Carlini

re PR c++/64834 (Captured variable not available in unevaluated context in a…

re PR c++/64834 (Captured variable not available in unevaluated context in a lambda with auto argument)

2015-03-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/64834
	* g++.dg/cpp1y/lambda-generic-uneval1.C: New.

From-SVN: r221205
parent 58ed456c
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.
......
// 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>(); }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment