Created on 2014-11-09.00:00:00 last changed 94 months ago
Proposed resolution (September, 2015):
Delete 9.3 [dcl.decl] paragraph 5:
The optional attribute-specifier-seq in a trailing-return-type appertains to the indicated return type. The type-id in a trailing-return-type includes the longest possible sequence of abstract-declarators. [Note: This resolves the ambiguous binding of array and function declarators. [Example:auto f()->int(*)[4]; // function returning a pointer to array[4] of int // not function returning array[4] of pointer to int
—end example] —end note]
[Adopted at the February, 2016 meeting.]
According to 9.3 [dcl.decl] paragraph 5,
The type-id in a trailing-return-type includes the longest possible sequence of abstract-declarators. [Note: This resolves the ambiguous binding of array and function declarators. [Example:
auto f()->int(*)[4]; // function returning a pointer to array[4] of int // not function returning array[4] of pointer to int—end example] —end note]
However, the grammar has changed since that rule and example were added; because trailing-return-type can only appear at the top level, there is no longer any potential ambiguity.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-02-06 00:00:00 | admin | set | status: tentatively ready -> cd4 |
2015-11-10 00:00:00 | admin | set | messages: + msg5601 |
2015-11-10 00:00:00 | admin | set | status: drafting -> tentatively ready |
2014-11-09 00:00:00 | admin | create |