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

Xing Xue via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jun 7 10:28:44 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(' ');
----------------
xingxue-ibm wrote:

Removed `__fill_ = widen(' ');` because the original statement `__fill_ = traits_type::eof();` sets the fill value to `traits_type::eof()` to indicate it is uninitialized. This is now accomplished by constructors, `_SentinelValueFill() : __fill_val_(_Traits::eof()) { }` and ` _FillHelper() : __set_(false) { }`.

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


More information about the libcxx-commits mailing list