diff options
Diffstat (limited to 'libcxx/include/__cxx03/sstream')
-rw-r--r-- | libcxx/include/__cxx03/sstream | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libcxx/include/__cxx03/sstream b/libcxx/include/__cxx03/sstream index 44c2423..741158a 100644 --- a/libcxx/include/__cxx03/sstream +++ b/libcxx/include/__cxx03/sstream @@ -354,9 +354,15 @@ private: public: // [stringbuf.cons] constructors: - _LIBCPP_HIDE_FROM_ABI basic_stringbuf() : __hm_(nullptr), __mode_(ios_base::in | ios_base::out) {} + _LIBCPP_HIDE_FROM_ABI basic_stringbuf() : __hm_(nullptr), __mode_(ios_base::in | ios_base::out) { + // it is implementation-defined whether we initialize eback() & friends to nullptr, and libc++ doesn't + __init_buf_ptrs(); + } - _LIBCPP_HIDE_FROM_ABI explicit basic_stringbuf(ios_base::openmode __wch) : __hm_(nullptr), __mode_(__wch) {} + _LIBCPP_HIDE_FROM_ABI explicit basic_stringbuf(ios_base::openmode __wch) : __hm_(nullptr), __mode_(__wch) { + // it is implementation-defined whether we initialize eback() & friends to nullptr, and libc++ doesn't + __init_buf_ptrs(); + } _LIBCPP_HIDE_FROM_ABI explicit basic_stringbuf(const string_type& __s, ios_base::openmode __wch = ios_base::in | ios_base::out) |