[libcxx-commits] [libcxx] [openmp] [libc++] basic_ios<wchar_t> cannot store fill character WCHAR_MAX (PR #89305)

Sean Perry via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 5 11:07:06 PDT 2024


================
@@ -605,7 +643,7 @@ template <class _CharT, class _Traits>
 inline _LIBCPP_HIDE_FROM_ABI void basic_ios<_CharT, _Traits>::init(basic_streambuf<char_type, traits_type>* __sb) {
   ios_base::init(__sb);
   __tie_  = nullptr;
-  __fill_ = traits_type::eof();
+  __fill_ = widen(' ');
----------------
perry-ca wrote:

It would be worth adding this as a comment.  It's so easy to think calling widen() here is the better thing to do.

https://github.com/llvm/llvm-project/pull/89305


More information about the libcxx-commits mailing list