On 4/21/20 6:42 AM, Iain Sandoe wrote:
Hi
As reported in the PR, per [dcl.fct.def.coroutine]/4 we should
be passing a reference to the object to the promise parameter
preview, and we are currently passing a pointer (this).
gcc/cp/ChangeLog:
2020-04-21 Iain Sandoe <[email protected]>
* coroutines.cc (struct param_info): Add a field to
note that the param is 'this'.
(morph_fn_to_coro): Convert this to a reference before
using it in the promise parameter preview.
ok, one nit
diff --git a/gcc/testsuite/g++.dg/coroutines/promise-parm-preview-this.C
b/gcc/testsuite/g++.dg/coroutines/promise-parm-preview-this.C
+ future foo(int param) { co_return 0; }
+};
\ No newline at end of file
^ needs a new line
nathan
--
Nathan Sidwell