Skip to content

<xstring>: Suppress code analysis warning C6510 for basic_string #5563

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

muellerj2
Copy link
Contributor

When instantiating basic_string with character types of class type, code analysis warning C6510 is produced. See here: https://gcc.godbolt.org/z/8dhaG8bd4

I noticed this while working on #995, when I tried to instantiate basic_regex (and hence basic_string) with a character type of class type to extend test coverage.

#3032 already resolved this issue for basic_string_view. This PR applies the same fix (warning suppression) to basic_string and extends the existing test coverage to basic_string. (Strictly speaking, the extended test isn't run in C++14 mode, but I think this is still good enough to validate a warning suppression applied unconditionally. And there will soon be positive indirect coverage in C++14 mode via the PRs for #995.)

@muellerj2 muellerj2 requested a review from a team as a code owner June 1, 2025 14:32
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Jun 1, 2025
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Jun 1, 2025
@StephanTLavavej StephanTLavavej self-assigned this Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Initial Review
Development

Successfully merging this pull request may close these issues.

2 participants