Numeric types can be implicitly casted to character types. This allows for the below overload to be used when assigning a numerical value to string.\
To fix this issue, use the appropriate conversion functions or character literals to avoid implicit conversion of numeric types.
basic_string& operator=( CharT ch );
This can lead to buggy logic.
std::string s;
int x = 5965;
s = 6;
s = x;
std::string s;
int x = 5965;
s = 6;
s = x;
std::string s;
int x = 5965;
s = '6';
s = std::to_string(x);
s = static_cast<char>(6);