[PATCH] D99005: [clang] WIP: Implement P2266
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 21 16:12:20 PDT 2021
mizvekov added a comment.
In D99005#2640121 <https://reviews.llvm.org/D99005#2640121>, @aaronpuchert wrote:
> With my previous comment I meant that it's better if you leave out the `co_return` bits for now because it's wrong anyway. We can't use `PerformMoveOrCopyInitialization`. It would just generate merge conflicts.
Okay, I think I see now what you mean.
For example this:
struct task {
struct promise_type {
...
void return_value(T &&value) {}
};
};
task<NoCopyNoMove> local2val() {
NoCopyNoMove value;
co_return value;
}
We should expect the test above to work, by binding value to the rvalue reference in task's promise, right?
Hmm, my natural course of action here would have been to figure out what is wrong and fix it.
I thought this would be good to have implemented before the committee decides on it.
@Quuxplusone thoughts? Is coroutine support optional here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99005/new/
https://reviews.llvm.org/D99005
More information about the cfe-commits
mailing list