[dcl.fct.def.coroutine]: Initialization of the copy of a parameter of a coroutine
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[dcl.fct.def.coroutine] paragraph 13 states the following:
When a coroutine is invoked, after initializing its parameters ([expr.call]), a copy is created for each coroutine parameter. For a parameter of type cv T, the copy is a variable of type cv T with automatic storage duration that is direct-initialized from an xvalue of type T referring to the parameter. [...]
Considering the following coroutine:
task<void> f(int& p)
{
...
}
the copy of the parameter p has type int& and it is initialized with an xvalue, which should not be legal.
Is there something else that I might be missing?
Thank you!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with [dcl.fct.def.coroutine] paragraph 13, then compare its wording with the parameter initialization rules referenced by [expr.call]. Determine whether the wording correctly covers a reference parameter such as int& p; done means resolving the question with clarified standard wording or an accepted explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100