Miscellaneous-NoStdStringInternalsΒΆ

Do not rely on std::string internals when converting to char*

Required inputs: IR

The operator[] of std::string should not be used to retrieve a reference or pointer into the string contents.

Instead, use the c_str() or data() member functions.

Possible Messages

Key

Text

Severity

Disabled

cpp_string_internals

Use of std::string operator[], use c_str() instead.

None

False

Options