PR c++/85815 - reference to member of enclosing template.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / lambda / lambda-dependent1.C
blob6fd2bb379bfa8df8da933bcabd1238e2f02a3187
1 // PR c++/85815
2 // { dg-do compile { target c++11 } }
4 template<class T>
5 class A {
6     static A* INSTANCE;
7     void foobar();
8     void moo() {}
9 };
11 template<class T>
12 A<T>* A<T>::INSTANCE = nullptr;
14 template<class T>
15 void A<T>::foobar() {
16     auto x = []() {
17         INSTANCE->moo();
18     };