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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-28 
19:58:41 UTC ---
(In reply to comment #0)
> that this happens because there is no constexpr conversion operator from the
> lambda function type to the corresponding function pointer type 

Is there supposed to be?

"The closure type for a lambda-expression with no lambda-capture has a public
non-virtual non-explicit const conversion function to pointer to function
having the same parameter and return types as the closure type's function call
operator. The value returned by this conversion function shall be the address
of a function that, when invoked, has the same effect as invoking the closure
type's function call operator."

A closure is not literal and its conversion operator isn't constexpr.

Reply via email to