diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 0b884cc..a252c95 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -20308,6 +20308,14 @@ For writing to a file, there is rarely a need to `flush`. ##### Note +For string streams (specifically `ostringstream`), the insertion of an `endl` is entirely equivalent +to the insertion of a `'\n'` character, but also in this case, `endl` might be significantly slower. + +`endl` does *not* take care of producing a platform specific end-of-line sequence (like "\r\n" on +Windows). So for a string stream, `s << endl` just inserts a *single* character, `'\n'`. + +##### Note + Apart from the (occasionally important) issue of performance, the choice between `'\n'` and `endl` is almost completely aesthetic. diff --git a/scripts/hunspell/isocpp.dic b/scripts/hunspell/isocpp.dic index ef45e4e..e9d90e5 100644 --- a/scripts/hunspell/isocpp.dic +++ b/scripts/hunspell/isocpp.dic @@ -389,6 +389,7 @@ optimizable O'Reilly org ostream +ostringstream overabstract overconstrain overconstrained