You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 7.1.6.4p7: In the sentence, “When a variable…type of its specifier”, we think specification for function return type deduction is unclear, because the term "initializer" is not directly related to return statement.
Proposed change
Change to: (e.g.)
the deduced return type is determined from the type of expression specified for the return statement.
The text was updated successfully, but these errors were encountered:
Per [dcl.init]p15, initialization is performed by a return statement. The notion of there being an initializer in this context is used in other parts of the standard (for instance, [dcl.init]p17). The proposed change is not correct, because the initializer may be a braced-init-list, which is not an expression.
Alternative proposed change:
When a variable declared using a placeholder type is initialized, or a return statement occurs inis used to initialize the object or reference returned by a function declared with a return type that contains a placeholder type, the deduced return type or variable type is determined from the type of itsthe initializer.
DIS 14882:2014 NB comment JP 07:
In 7.1.6.4p7: In the sentence, “When a variable…type of its specifier”, we think specification for function return type deduction is unclear, because the term "initializer" is not directly related to return statement.
Proposed change
Change to: (e.g.)
The text was updated successfully, but these errors were encountered: