8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice20.C
Paolo Carlini 97e63e1272 re PR c++/61362 (g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 does not compile lambda with template)
2017-09-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/61362
	* g++.dg/cpp0x/lambda/lambda-ice19.C: New.
	* g++.dg/cpp0x/lambda/lambda-ice20.C: Likewise.

From-SVN: r252724
2017-09-13 18:18:48 +00:00

12 lines
174 B
C

// PR c++/61362
// { dg-do compile { target c++11 } }
template <typename>
struct S {
int f{[this](){return 42;}()};
};
int main(){
return S<int>{}.f; // should be 42
}