The permissible types in [over.match.conv] should not be reference types
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
Assuming that “cv T” is the type of the object being initialized, the candidate functions are selected as follows:
- The permissible types for non-explicit conversion functions are those that can be converted to type T via a standard conversion sequence ([over.ics.scs]).
- For direct-initialization, the permissible types for explicit conversion functions are those that can be converted to type T with a (possibly trivial) qualification conversion ([conv.qual]); otherwise there are none.
Is that reference to type T considered the permissible type here? It's probably not, if it were, it will be conflicted with [over.match.funcs#general-7]. From the perspective of conversion sequence, an argument of reference type should be first adjusted to the referenced type(T) as per [expr#type-1] prior to any further analysis. Hence, it is arguably said that from T to T satisfies the above requirement. It's unclear here, maybe we should explicitly say that
The permissible types for non-explicit conversion functions are those non-reference types that can be converted to type T via a standard conversion sequence ([over.ics.scs]).
For direct-initialization, the permissible types for explicit conversion functions are those non-reference types that can be converted to type T with a (possibly trivial) qualification conversion ([conv.qual]); otherwise there are none.
It seems that the wording possibly trivial is newly introduced, Is that if we say identity conversion is more clear?
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 [over.match.conv] and compare its permissible-type wording with [over.match.funcs#general-7], [expr#type-1], [over.ics.scs], and [conv.qual]. Check whether reference types are excluded and whether “possibly trivial” or “identity conversion” is the clearer term; done means the standard wording and its interpretation are resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100