[Bug c++/56039] ICE in iterative_hash_template_arg, at cp/pt.c:1606

hstong at ca dot ibm.com gcc-bugzilla@gcc.gnu.org
Sat Jan 19 20:11:00 GMT 2013


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

--- Comment #4 from Hubert Tong <hstong at ca dot ibm.com> 2013-01-19 20:10:59 UTC ---
(In reply to comment #3)
I seem to find that the expression in question
> 
> false && [](){}
> 
is valid because there is a implicit conversion sequence consisting of a
user-defined conversion to pointer-to-function followed by a conversion to bool
from the pointer type.

> I'm forwarding this problem to CWG. I don't think that any compiler change
> will be done before that decision, because the CWG group intentionally tried
> to forbid lambda expressions within template declarations because of some
> known technical problems.
Sure. While I may not have a full appreciation of the difficultly for having an
implementation which works with this, I am aware that there is at least the
issue with mangling hinted at by the note in 14.5.6.1 [temp.over.link] p7 with
regards to the linking of equivalent declarations.

I am not sure, though, that implementation difficulty is a good reason to
remove the ability to have SFINAE applied on statements such as the declaration
in the IsConstructibleImpl specialization above.



More information about the Gcc-bugs mailing list