File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,16 @@ namespace ST
197
197
return append_char (ch);
198
198
}
199
199
200
+ // Some systems alias int8_t as char rather than signed char.
201
+ // We don't want to remove the char overload since it's often better
202
+ // than streaming a string or calling .append_char(), so instead we
203
+ // can disable the use of these overloads on "sane" platforms to
204
+ // try to catch their misuse.
205
+ // HINT: If you need to stream an int8_t or uint8_t, cast it to
206
+ // an int or unsigned int to get the correct behavior...
207
+ string_stream &operator <<(signed char ) = delete ;
208
+ string_stream &operator <<(unsigned char ) = delete ;
209
+
200
210
string_stream &operator <<(const string &text)
201
211
{
202
212
return append (text.c_str (), text.size ());
You can’t perform that action at this time.
0 commit comments