<xstring>: Suppress code analysis warning C6510 for basic_string by muellerj2 · Pull Request #5563 · microsoft/STL (original) (raw)
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.)