[Bug c++/61362] g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 does not compile lambda with template
thibaut.lutz at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Sat Mar 7 10:46:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61362
Thibaut LUTZ <thibaut.lutz at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thibaut.lutz at googlemail dot com
--- Comment #3 from Thibaut LUTZ <thibaut.lutz at googlemail dot com> ---
This triggers the same internal error on HEAD 5.0.0 20150306.
>>>>>>
template <typename>
struct S {
int f{[this](){return 42;}()};
};
int main(){
return S<int>{}.f; // should be 42
}
<<<<<<
prog.cc: In instantiation of 'struct S<int>::<lambda()>':
prog.cc:3:29: required from here
prog.cc:3:10: internal compiler error: in tsubst_copy, at cp/pt.c:12872
int f{[this](){return 42;}()};
More information about the Gcc-bugs
mailing list