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

David Tenty via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 10 19:35:11 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(' ');
----------------
daltenty wrote:

> This is now accomplished by constructors

basic_ios has a bunch of rather interesting initialization requirements according to the standard (related to why it has an init function at all), and the constructor isn't really supposed to initialize in some cases.

I think to preserve that, and the original flow of the code, you should add an Init function to the both fill types in place of the constructor and call it here.



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


More information about the Openmp-commits mailing list