This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


1389. Recursive reference in trailing-return-type

Section: 9.3.4.6  [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.