On Wed, 28 Jun 2017, Jason Merrill wrote:
In the testcase we SEGV due to infinite recursion because the
noexcept-specifier of f depends on itself. Fixed by keeping track of
which functions we're currently trying to instantiate noexcept for.
Hello,
in the testcase, it makes sense that this is an error. In some other
cases, say for instance
int fact(int n) noexcept(auto) { return (n>1)?n*f(n-1):1; }
(yes, I know we still do not have noexcept(auto))
it would make sense to pretend that the recursive call does not throw for
the purpose of determining that fact is indeed noexcept. Then we get into
solving the same thing as IPA already does... And the standard does not
require implementations to be clever there. Still, it could have been nice
:-/
--
Marc Glisse