Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CWG2514 Modifying const subobjects #1365

Open
jensmaurer opened this issue Nov 12, 2022 · 2 comments
Open

CWG2514 Modifying const subobjects #1365

jensmaurer opened this issue Nov 12, 2022 · 2 comments
Labels
paper needed An issue needs a paper to describe its solution SG12 Undefined Behavior
Milestone

Comments

@jensmaurer
Copy link
Member

jensmaurer commented Nov 12, 2022

CWG2514 seeks to allow relaxing the rules for modifying const objects:

  • const subobjects of non-const complete objects can be modified
  • objects with dynamic storage duration are not const objects
  • (not in this issue, but related) function parameter objects are not const objects

Note the distinction between "const object" and "lvalue of const type"; the latter is not touched.

CWG solicits the advice of SG12 in handling this issue.

@jensmaurer jensmaurer added the SG12 Undefined Behavior label Nov 12, 2022
@jensmaurer jensmaurer added this to the 2023-telecon milestone Jan 25, 2023
@erichkeane
Copy link
Collaborator

erichkeane commented Nov 9, 2023

CWG2514 was discussed during the Thursday AM session in Kona in EWG/SG12.

The room unanimously decided that this is something we need a paper for, so Alisdair offered to find an author to provide one.

@jensmaurer jensmaurer modified the milestones: 2023-telecon, 2024-telecon Mar 19, 2024
@hanickadot
Copy link
Collaborator

EWG St. Louis: GDR volunteered to write a paper tightening the rules.

@hanickadot hanickadot added the paper needed An issue needs a paper to describe its solution label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paper needed An issue needs a paper to describe its solution SG12 Undefined Behavior
Projects
None yet
Development

No branches or pull requests

3 participants