Commit ee8b2b8e by Paolo Carlini Committed by Paolo Carlini

re PR c++/89522 (ICE: trying to capture 'f' in instantiation of generic lambda)

2019-02-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/89522
	* g++.dg/cpp1y/lambda-generic-ice10.C: New.

From-SVN: r269275
parent 66dcb747
2019-02-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/89522
* g++.dg/cpp1y/lambda-generic-ice10.C: New.
2019-02-28 Jakub Jelinek <jakub@redhat.com>
PR c/89525
......
// PR c++/89522
// { dg-do compile { target c++14 } }
template <typename F>
void foo (F f)
{
f (1);
}
template <typename T>
void bar (T)
{
auto f = [&](auto i) { if (f); }; // { dg-error "use of .f. before deduction of .auto." }
foo (f);
}
int main ()
{
bar (0);
}
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