Commit 129c8d7e 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)

2018-03-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/61135
	* g++.dg/cpp0x/lambda/lambda-61135.C: New.

From-SVN: r258165
parent e176bb08
2018-03-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61135
* g++.dg/cpp0x/lambda/lambda-61135.C: New.
2018-03-02 Marek Polacek <polacek@redhat.com>
PR c++/84578
......
// { dg-do compile { target c++11 } }
struct Base
{
virtual int b() const{return 1;};
};
struct Super:Base{};
int main()
{
constexpr Super s;
[]{s.b();}(); // { dg-error "not captured" }
}
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