diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/lambda/lambda-61148.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-61148.C | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-61148.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-61148.C new file mode 100644 index 0000000000..879030caa0 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-61148.C @@ -0,0 +1,33 @@ +// PR c++/61148 +// { dg-do compile { target c++11 } } + +class DB +{ +protected: + void foo() {}; +}; + +class DC : public DB +{ +public: + DC() + { + [this]() {DB::foo();}(); + }; +}; + +template <class T> +class DC2 : public T +{ +public: + DC2() + { + [this]() {T::foo();}(); + }; +}; + +int main(void) +{ + DC x; + DC2<DB> x2; +} |