diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2014-03-07 21:45:32 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2014-03-07 21:45:32 +0000 |
commit | b162b17f05375d91fc121df2182207bfefd4d7d1 (patch) | |
tree | fb695ef85cf695a493c35ccd3e8ec49dd59d4148 /libcxx/include/iomanip | |
parent | 15ae783e1487666b5c84f2defdf566cb0435ad95 (diff) | |
download | bcm5719-llvm-b162b17f05375d91fc121df2182207bfefd4d7d1.tar.gz bcm5719-llvm-b162b17f05375d91fc121df2182207bfefd4d7d1.zip |
Implement LWG #2344: quoted()'s interaction with padding is unclear. I think that anyone using quoted with padding is really confused, but it should work the way the rest of iostreams works.
llvm-svn: 203290
Diffstat (limited to 'libcxx/include/iomanip')
-rw-r--r-- | libcxx/include/iomanip | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip index e334c7de9fd..a5042c7df81 100644 --- a/libcxx/include/iomanip +++ b/libcxx/include/iomanip @@ -519,15 +519,16 @@ std::basic_ostream<_CharT, _Traits> & __quoted_output ( basic_ostream<_CharT, _Traits> &__os, _ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape ) { - __os << __delim; + _VSTD::basic_string<_CharT, _Traits> __str; + __str.push_back(__delim); for ( ; __first != __last; ++ __first ) { if (_Traits::eq (*__first, __escape) || _Traits::eq (*__first, __delim)) - __os << __escape; - __os << *__first; + __str.push_back(__escape); + __str.push_back(*__first); } - __os << __delim; - return __os; + __str.push_back(__delim); + return __put_character_sequence(__os, __str.data(), __str.size()); } template <class _CharT, class _Traits, class _String> |