<xstring>
: Suppress code analysis warning C6510 for basic_string
#5563
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When instantiating
basic_string
with character types of class type, code analysis warning C6510 is produced. See here: https://gcc.godbolt.org/z/8dhaG8bd4I noticed this while working on #995, when I tried to instantiate
basic_regex
(and hencebasic_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) tobasic_string
and extends the existing test coverage tobasic_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.)