From ff1e00294fcc81bcb4509dbac5b156d64cbeac38 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Thu, 12 Aug 2021 08:52:32 +0200 Subject: [PATCH] [stmt.return,dcl.fct.def.coroutine] Avoid use of 'glvalue result' --- source/declarations.tex | 2 +- source/statements.tex | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index ba7fbce79d..d217f32852 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -6466,7 +6466,7 @@ \pnum The expression \tcode{\exposid{promise}.get_return_object()} is used to initialize -the glvalue result or prvalue result object of a call to a coroutine. +the returned reference or prvalue result object of a call to a coroutine. The call to \tcode{get_return_object} is sequenced before the call to \tcode{initial_suspend} diff --git a/source/statements.tex b/source/statements.tex index 5518c825eb..04863896ca 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -815,7 +815,8 @@ in a function whose return type is not \cv{}~\keyword{void}; \indextext{conversion!return type}% the \tcode{return} statement initializes the -glvalue result or prvalue result object of the (explicit or implicit) function call +returned reference or prvalue result object +of the (explicit or implicit) function call by copy-initialization\iref{dcl.init} from the operand. \begin{note} A \tcode{return} statement can involve