[Bug c++/61135] It seems to be not able to call virtual method of literal object in lambda expression
lc289dafd7ybme05se at softbank dot ne.jp
gcc-bugzilla@gcc.gnu.org
Sun Apr 19 00:13:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61135
lc289dafd7ybme05se at softbank dot ne.jp changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lc289dafd7ybme05se@softbank
| |.ne.jp
--- Comment #6 from lc289dafd7ybme05se at softbank dot ne.jp ---
below also doesn't work
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;
}
//g++ 4.9.2
g++ -std=c++14 hd.cpp
hd.cpp: In instantiation of ‘void B< <template-parameter-1-1> >::funcB() [with
<template-parameter-1-1> = A]’:
hd.cpp:15:10: required from here
hd.cpp:9:2: internal compiler error: in cp_genericize_r, at
cp/cp-gimplify.c:1175
}
^
More information about the Gcc-bugs
mailing list