This is the mail archive of the
mailing list for the GCC project.
Re: [C++ RFC / Patch] PR 54080, PR 52875 and more (aka SFINAE vs template recursion depth)
- From: Florian Weimer <fweimer at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: Jason Merrill <jason at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 09 Aug 2013 09:13:44 +0200
- Subject: Re: [C++ RFC / Patch] PR 54080, PR 52875 and more (aka SFINAE vs template recursion depth)
- References: <5203F75A dot 9080206 at oracle dot com> <52042C5C dot 7060702 at redhat dot com> <6414e1ec-56b5-42f7-821d-69f4e9325a15 at email dot android dot com>
On 08/09/2013 08:43 AM, Paolo Carlini wrote:
Yes, that is intended. Changing that could mean that the meaning of
code depends on what max depth the user selected.
Indeed. Yesterday I wondered what would happen if the front-end had a way to detect, in some very specific and special cases only of course, really infinite recursions, in the sense that no increase in the depth would "cure" them. Would it be ok in that case to sfinae away?
Eh, hopefully not. Otherwise, program behavior would depend on how well
the compiler solves the halting problem.
It's interesting question, but hopefully we can make all errors due to
exceeded implementation limits hard errors, not subject to SFINAE.
Florian Weimer / Red Hat Product Security Team