The check finds assignments of an integer to std::basic_string<CharT>
(std::string
, std::wstring
, etc.). The source of the problem is the following assignment operator of std::basic_string<CharT>
:
Numeric types can be implicity casted to character types.
Use the appropriate conversion functions or character literals.
In order to suppress false positives, use an explicit cast.