auto, decltype & trailing return types
Type deduction from initializers, decltype, the auto f() -> T declarator syntax and their core fixes.
Connected features
Papers
7 · Berlin 2006 → Madrid 2011Adds auto type deduction from a variable's initializer.
Uses decltype in the library to specify return types precisely (e.g. std::function, bind).
Adds decltype(expr), yielding the declared type of an expression.
Adds the trailing-return-type syntax auto f(args) -> T.
Allows decltype(...) in more places (base-specifiers, destructor names) per core issues 743 and 950.
Makes decltype on a call expression not require the return type to be complete (US22/DE9).
Allows naming non-static data members in trailing return types and unevaluated operands. Minutes: issues 1017, 1207.