On Wed, Jun 28, 2017 at 5:11 PM, Marc Glisse <marc.gli...@inria.fr> wrote:
> 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.
>
> 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.

True; the recursive call can't make the function more throwy.

Jason

Reply via email to