[Bug c++/53488] Incorrect code generated when capturing a constant by reference in a lambda
lunow at math dot hu-berlin.de
gcc-bugzilla@gcc.gnu.org
Sun Jun 24 14:30:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53488
--- Comment #5 from Daniel Lunow <lunow at math dot hu-berlin.de> 2012-06-24 14:30:19 UTC ---
Created attachment 27694
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27694
integral constant-expression not an integral constant-expression
This test case should compile, but it does not. Its not the same as the
constant not beeing captured, but I can imagine it is very close problem.
C:\dev\projects\compiler test>g++ -std=c++11 gcc_test6.cpp
gcc_test6.cpp: In instantiation of 'foo() [with T = void]::<lambda()>':
gcc_test6.cpp:8:4: required from 'struct foo() [with T = void]::<lambda()>'
gcc_test6.cpp:8:3: required from 'void foo() [with T = void]'
gcc_test6.cpp:13:13: required from here
gcc_test6.cpp:8:15: error: size of array is not an integral constant-expression
More information about the Gcc-bugs
mailing list