File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
libcxx-03/input.output/string.streams/stringbuf
std/input.output/string.streams/stringbuf/stringbuf.cons Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -354,9 +354,15 @@ private:
354354
355355public:
356356 // [stringbuf.cons] constructors:
357- _LIBCPP_HIDE_FROM_ABI basic_stringbuf () : __hm_(nullptr ), __mode_(ios_base::in | ios_base::out) {}
357+ _LIBCPP_HIDE_FROM_ABI basic_stringbuf () : __hm_(nullptr ), __mode_(ios_base::in | ios_base::out) {
358+ // it is implementation-defined whether we initialize eback() & friends to nullptr, and libc++ doesn't
359+ __init_buf_ptrs ();
360+ }
358361
359- _LIBCPP_HIDE_FROM_ABI explicit basic_stringbuf (ios_base::openmode __wch) : __hm_(nullptr ), __mode_(__wch) {}
362+ _LIBCPP_HIDE_FROM_ABI explicit basic_stringbuf (ios_base::openmode __wch) : __hm_(nullptr ), __mode_(__wch) {
363+ // it is implementation-defined whether we initialize eback() & friends to nullptr, and libc++ doesn't
364+ __init_buf_ptrs ();
365+ }
360366
361367 _LIBCPP_HIDE_FROM_ABI explicit basic_stringbuf (const string_type& __s,
362368 ios_base::openmode __wch = ios_base::in | ios_base::out)
Original file line number Diff line number Diff line change 88
99// <sstream>
1010
11- // XFAIL: FROZEN-CXX03-HEADERS-FIXME
12-
1311// How the constructors of basic_stringbuf initialize the buffer pointers is
1412// not specified. For some constructors it's implementation defined whether the
1513// pointers are set to nullptr. Libc++'s implementation directly uses the SSO
Original file line number Diff line number Diff line change 1515// basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {} // C++20
1616// explicit basic_stringbuf(ios_base::openmode which); // C++20
1717
18- // XFAIL: FROZEN-CXX03-HEADERS-FIXME
19-
2018#include < sstream>
2119#include < cassert>
2220
You can’t perform that action at this time.
0 commit comments