File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 4347
4347
The initialization that occurs in the \tcode {=} form of a
4348
4348
\grammarterm {brace-or-equal-initializer} or
4349
4349
\grammarterm {condition}\iref {stmt.select },
4350
- as well as in argument passing, function return,
4350
+ as well as in argument passing,
4351
4351
throwing an exception\iref {except.throw },
4352
4352
handling an exception\iref {except.handle },
4353
4353
and aggregate member initialization\iref {dcl.init.aggr },
Original file line number Diff line number Diff line change 826
826
A \tcode {return} statement with an operand of type \tcode {void} shall be used only
827
827
in a function whose return type is \cv {}~\tcode {void}.
828
828
A \tcode {return} statement with any other operand shall be used only
829
- in a function whose return type is not \cv {}~\tcode {void};
829
+ in a function whose return type is not \cv {}~\tcode {void}.
830
+
831
+ \pnum
830
832
\indextext {conversion!return type}%
831
- the \tcode {return} statement initializes the
832
- glvalue result or prvalue result object of the (explicit or implicit) function call
833
- by copy-initialization\iref {dcl.init } from the operand.
833
+ The sequence of conversions applied to the operand of the \tcode {return} statement
834
+ is the same as if the parenthesized operand was used to copy-initialize\iref {dcl.init }
835
+ a hypothetical variable having the same type as the return type of the function
836
+ containing the \tcode {return} statement.
834
837
\begin {note }
835
838
A \tcode {return} statement can involve
836
839
an invocation of a constructor to perform a copy or move of the operand
You can’t perform that action at this time.
0 commit comments