http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56915



--- Comment #2 from Nathan Ridge <zeratul976 at hotmail dot com> 2013-04-12 
07:40:46 UTC ---

(In reply to comment #1)

> I am not an expert of C++11, but I am trying to help you with this ICE. Before

> I jump into the compiler to find the bugs, I guess you probably made several

> mistakes in your given code.



I know the code is invalid. However, an ICE is always a compiler bug, even if

it's for invalid code. The compiler should give proper errors for invalid code.

(In this case it gives the ICE after giving the proper errors - that's still a

bug). Also, an ICE on invalid code can indicate a logic error in the compiler's

code that may also be causing (yet to be discovered) ICEs on valid code.





Also, just FYI:



> 3)C++11 seems to only support monomorphic lambdas, if you want to use

> polymorphic lambdas, you probably should use other libraries like Boost.



Using a lambda inside a template does not make it polymorphic. Each

instantiation of the template will have a different, monomorphic, lambda.

Reply via email to