Skip to content

[2026-03 CWG Motion 9] P3726R2 Adjustments to Union Lifetime Rules#8888

Open
eisenwave wants to merge 5 commits intocplusplus:mainfrom
eisenwave:motions-2026-03-cwg-9
Open

[2026-03 CWG Motion 9] P3726R2 Adjustments to Union Lifetime Rules#8888
eisenwave wants to merge 5 commits intocplusplus:mainfrom
eisenwave:motions-2026-03-cwg-9

Conversation

@eisenwave
Copy link
Copy Markdown
Member

@eisenwave eisenwave commented Mar 29, 2026

Fixes NB DE-087 (C++26 CD).
Fixes #8830

Also fixes cplusplus/papers#2356
Also fixes https://github.com/cplusplus/nbballot/issues/664
Also fixes cplusplus/papers#2418

@eisenwave eisenwave added this to the post-2026-03 milestone Mar 29, 2026
@brevzin
Copy link
Copy Markdown
Contributor

brevzin commented Mar 30, 2026

Dunno if we also want to link the other NB comments here (which I forgot to mention in the paper):

  • US 48-086, which is marked a direct dupe of the German one.
  • FR-006-088, which actually asked to revert all of p3074
  • PL-003, which asked to just revert part of p3074 (which this paper does, but goes further).

Fixes NB DE-087 (C++26 CD).
The formal term is just "aggregate", with no type, which is surprising, but oh well.
@eisenwave eisenwave force-pushed the motions-2026-03-cwg-9 branch from b161010 to 597616d Compare March 30, 2026 19:15
@eisenwave
Copy link
Copy Markdown
Member Author

Dunno if we also want to link the other NB comments here (which I forgot to mention in the paper):

Thanks for the list. I'll leave that up to Thomas. I'm not sure if we want dupes and already closed issues to be referenced in the commit message and/or in the issue.

@jensmaurer
Copy link
Copy Markdown
Member

I think we want links to "accepted" NB comments in the commit and in the pull request where the commit contributes to resolving the NB comment. That also includes duplicates (because national bodies ostensibly don't know about each other's comment), but not "rejected; we're going in another direction" issues.

source/basic.tex Outdated
occupied by the complete object of that subobject.

\pnum
The \defn{union elemental subobject} is
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text says "A", not "The"?

Also, can we index this under "union"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and/or under "subobject" -- maybe have both, and have one "see other"?

Copy link
Copy Markdown
Member Author

@eisenwave eisenwave Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the "The".

I honestly don't know how to perform the double nested indexing you're looking for. Just nesting it under union would be defnadj I guess. If you can give me the exact code, I can add it to the PR.

#define @\defnlibxname{cpp_lib_ssize}@ 201902L // freestanding, also in \libheader{iterator}
#define @\defnlibxname{cpp_lib_sstream_from_string_view}@ 202306L // also in \libheader{sstream}
#define @\defnlibxname{cpp_lib_stacktrace}@ 202011L // also in \libheader{stacktrace}
#define @\defnlibxname{cpp_lib_start_lifetime}@ 202603L // freestanding, also in \libheader{memory}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"freestanding" is not in the paper?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, but it's in the synopsis. We can mention it as an editorial fix.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in a fixup commit right now. Maybe it deserves a proper message.

\pnum
\mandates
\tcode{T} is a complete type and
an implicit-lifetime\iref{basic.types} aggregate\iref{dcl.init.aggr}.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing final "type".

Copy link
Copy Markdown
Member Author

@eisenwave eisenwave Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's intentionally removed by fixup commit. The defined term is just "aggregate", not "aggregate type", though this continues to surprise people.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants