This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114b. See for the official list.


1389. Recursive reference in trailing-return-type

Section:  [dcl.fct]     Status: NAD     Submitter: Daniel Krügler     Date: 2011-09-04

There doesn't appear to be an explicit prohibition of a function declaration of the form

    auto f() -> decltype(f());

Presumably there should be.

Rationale (February, 2012):

As noted in issue 1433, the point of declaration of the function name is after the complete declarator, i.e., after the trailing return type, so the recursion posited in this issue cannot occur.