[dcl.fct.def.coroutine] p13 "xvalue of type T" where T is lvalue reference type
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
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.
Since [expr.type] p1 says
If an expression initially has the type “reference to T” ([dcl.ref], [dcl.init.ref]), the type is adjusted to T prior to any further analysis.
When we say xvalue, the type of it should be a non-reference type. However, in [dcl.fct.def.coroutine] p13, T could be any type such as "lvalue reference type". How could an expression be an xvalue when it has an lvalue reference type? Regardless of [expr.type] p1 or a xvalue of lvalue reference type, [dcl.fct.def.coroutine] p13 conflict with both of them.
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 by reading [dcl.fct.def.coroutine] p13 alongside [expr.type] p1, [expr.call], [dcl.ref], and [dcl.init.ref]. Determine how the wording applies when T is an lvalue reference type, then clarify the conflicting standard text so the xvalue description is consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tex
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100