Skip to content

[filebuf.virtuals] Add missing const to pointer variables#8259

Merged
tkoeppe merged 1 commit into
cplusplus:mainfrom
frederick-vs-ja:filebuf-ptr-const
Oct 31, 2025
Merged

[filebuf.virtuals] Add missing const to pointer variables#8259
tkoeppe merged 1 commit into
cplusplus:mainfrom
frederick-vs-ja:filebuf-ptr-const

Conversation

@frederick-vs-ja

Copy link
Copy Markdown
Contributor

The fourth parameter of codecvt::out and codecvt::in are const C*&, but Effects use C* variables, which makes the call ill-formed.

The intent seems sufficient clear and we should probably use const C* variables in these places.

Fixes #8256.

The fourth parameter of `codecvt::out` and `codecvt::in` are
`const C*&`, but _Effects_ use `C*` variables, which makes the call
ill-formed.

The intent seems sufficient clear and we should probably use `const C*`
variables in these places.
@frederick-vs-ja frederick-vs-ja changed the title [filebuf] Add missing const to pointer variables [filebuf.virtuals] Add missing const to pointer variables] Add missing const to pointer variables Sep 29, 2025
@frederick-vs-ja frederick-vs-ja changed the title [filebuf.virtuals] Add missing const to pointer variables] Add missing const to pointer variables [filebuf.virtuals] Add missing const to pointer variables Sep 29, 2025
@jensmaurer

Copy link
Copy Markdown
Member

@jwakely , could you have a look, please? Looks reasonable to me, at least...

@tkoeppe

tkoeppe commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

@jwakely could you confirm that this is OK editorially?

@jwakely jwakely left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, the intent is clear but this is needed to make the code well-formed.

@tkoeppe tkoeppe merged commit 4bf58f8 into cplusplus:main Oct 31, 2025
2 checks passed
@frederick-vs-ja frederick-vs-ja deleted the filebuf-ptr-const branch October 31, 2025 18:54
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 this pull request may close these issues.

[filebuf.virtuals] Missing const-qualifiers in specification of overflow/underflow.

4 participants