Created on 2014-03-12.00:00:00 last changed 95 months ago
[Moved to DR at the November, 2014 meeting.]
Proposed resolution (June, 2014):
Change 9.2.9.7 [dcl.spec.auto] paragraph 2 as follows:
The placeholder type can appear with a function declarator in the decl-specifier-seq, type-specifier-seq, conversion-function-id, or trailing-return-type, in any context where such a declarator is valid. If the function declarator includes a trailing-return-type (9.3.4.6 [dcl.fct]), that specifies the declared return type of the function. Otherwise, the function declarator shall declare a function. If the declared return type of the function contains a placeholder type, the return type of the function is deduced from return statements in the body of the function, if any.
There appear to be no restrictions against using the auto specifier in examples like the following:
template<typename T> using X = T; X<auto()> f_with_deduced_return_type; // ok std::vector<auto(*)()> v; // ok?! void f(auto (*)()); // ok?!
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-02-06 00:00:00 | admin | set | status: drwp -> cd4 |
2015-05-25 00:00:00 | admin | set | status: dr -> drwp |
2015-04-13 00:00:00 | admin | set | messages: + msg5365 |
2014-11-24 00:00:00 | admin | set | status: ready -> dr |
2014-07-07 00:00:00 | admin | set | messages: + msg5068 |
2014-07-07 00:00:00 | admin | set | status: open -> ready |
2014-03-12 00:00:00 | admin | create |