2015-07-15 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/57394
* include/std/streambuf (basic_streambuf(const basic_streambuf&)):
Fix initializer for _M_out_end.
(operator=(const basic_streambuf&)): Replace stub with actual
implementation.
--- libstdc++-v3/include/std/streambuf
+++ libstdc++-v3/include/std/streambuf
@@ -802,12 +802,22 @@
basic_streambuf(const basic_streambuf& __sb)
: _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur),
_M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg),
- _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur),
+ _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_end),
_M_buf_locale(__sb._M_buf_locale)
{ }
basic_streambuf&
- operator=(const basic_streambuf&) { return *this; };
+ operator=(const basic_streambuf& __sb)
+ {
+ _M_in_beg = __sb._M_in_beg;
+ _M_in_cur = __sb._M_in_cur;
+ _M_in_end = __sb._M_in_end;
+ _M_out_beg = __sb._M_out_beg;
+ _M_out_cur = __sb._M_out_cur;
+ _M_out_end = __sb._M_out_end;
+ _M_buf_locale = __sb._M_buf_locale;
+ return *this;
+ };
};
// Explicit specialization declarations, defined in src/streambuf.cc.