/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / pr61636-3.C
blob18f83fe435e0b3adc0d01a156df85c65d2c1d992
1 // PR c++/61636
2 // { dg-do compile { target c++14 } }
3 // permissiveness doesn't make this permitted
4 // { dg-additional-options "-fpermissive" }
6 // ICE because we attempt to use dependent Foo during error recovery
7 // and die with an unexpected this capture need.
9 template <typename T> struct Base
11   void Foo (int);
14 template <typename T> struct A : Base<T> {
15   void b ();
18 template <typename T> void A<T>::b() {
20   auto lam = [&](auto asdf) { Foo (asdf); }; // { dg-error "not declared" }
22   lam (T(0));
25 template void A<int>::b ();