cplusplus / cplusplus/draft

Now U(*)[N] is convertible to cv U(*)[], can [util.smartptr.shared.general] be simplified?

Open
#4,697 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

[util.smartptr.shared.general]/6:

For the purposes of subclause [smartptr], a pointer type Y* is said to be compatible with a pointer type T* when either Y* is convertible to T* or Y is U[N] and T is cv U[].

IIUC, P0388R4 makes "pointer to array of N U" convertible to "pointer to array of unknown bound of (possibly cv-qualified) U". Hence, the definition is now equivalent to "Y* is compatible with T* when Y* is convertible to T*".

Does it make sense to strike this definition of "compatible with" and replace its use with "convertible to"?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading [util.smartptr.shared.general]/6 alongside P0388R4, then search the draft for uses of “compatible with” in the smart-pointer clauses. Done means the project reaches and records a standards decision on whether the definition can be removed and its uses replaced with “convertible to”.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, tex
Domain
compilers, documentation
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.