cplusplus / cplusplus/draft

[intro.object] The term "potentially-overlapping subobject" doesn't seem to exclude reference members

Open
#6,158 2 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

no_unique_address can be applied to non-static reference data members, which is needed for ranges::minmax.

However, the current wording seemingly implies that a non-static data member of a reference type declared with [[no_unique_address]] would also be a "potentially-overlapping subobject" even if it can't be a subobject.

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 reviewing the standard wording around the definition of a “potentially-overlapping subobject” and the rules for [[no_unique_address]] on non-static reference data members. Confirm how the wording applies to the ranges::minmax case, then update the draft wording so reference members are not treated as subobjects when they cannot be subobjects.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.