diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C new file mode 100644 index 000000000..29cd2a97b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C @@ -0,0 +1,13 @@ +// PR c++/48523 +// { dg-options -std=c++0x } + +template<typename> +struct X +{ + bool b; + + void f() + { + [this]{ return b; }; + } +}; |