PR c++/53137
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / lambda / lambda-this6.C
blobacf4eaa7fcb965c11f8091e30cbc86cee78efa77
1 // PR c++/53137
2 // { dg-options -std=c++11 }
4 template <typename STORE>
5 void getParent(STORE& tStore)
9 struct  Store
11     template <typename CheckParentFunc>
12     void updateChildCommon(CheckParentFunc c)
13     {
14         c();
15     }
17     template <typename T>
18     int& getStore();
20     template <typename T>
21     void updateChild(const T& obj)
22     {
23         updateChildCommon([this] () { getParent(getStore<T>()); });
24     }
26     void update(int obj);
29 void Store::update(int obj)
31     updateChild(obj);