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

[dcl.stc]/9 allows modification of any member provided any is mutable #2837

Closed
sdkrystian opened this issue Apr 21, 2019 · 1 comment · Fixed by #2850
Closed

[dcl.stc]/9 allows modification of any member provided any is mutable #2837

sdkrystian opened this issue Apr 21, 2019 · 1 comment · Fixed by #2850
Assignees

Comments

@sdkrystian
Copy link
Contributor

The mutable specifier on a class data member nullifies a const specifier applied to the containing class object

This has the effect of saying that specifying any data member of a class as mutable is result in the object losing it's const qualification, leading to any member being able to be modified. This is obviously not the intended meaning.

@jensmaurer jensmaurer self-assigned this Apr 29, 2019
@jensmaurer
Copy link
Member

I think the right fix is to turn [dcl.stc} p9 into a note; this is all said elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants