Commit 13380861 by Paolo Carlini Committed by Paolo Carlini

re PR c++/61135 (It seems to be not able to call virtual method of literal…

re PR c++/61135 (It seems to be not able to call virtual method of literal object in lambda expression)

2017-09-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/61135
	* g++.dg/cpp0x/lambda/lambda-ice18.C: New.
	* g++.dg/cpp1y/lambda-ice2.C: Likewise.

From-SVN: r252571
parent f15643d4
2017-09-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61135
* g++.dg/cpp0x/lambda/lambda-ice18.C: New.
* g++.dg/cpp1y/lambda-ice2.C: Likewise.
2017-09-13 Jackson Woodruff <jackson.woodruff@arm.com>
* gcc.target/aarch64/simd/vect_str_zero.c: Update testcase.
......
// PR c++/61135
// { dg-do compile { target c++11 } }
struct Base
{
virtual int b() const{return 1;};
};
struct Super:Base{};
int main()
{
constexpr Super s = Super();
[&]{s.b();}();
}
// PR c++/61135
// { dg-do compile { target c++14 } }
struct A
{
int funcA(){return 0;}
};
template<class>
struct B:virtual public A{
void funcB(){
[a=this->funcA()]{};
}
};
int main()
{
B<A> b;
b.funcB();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment