X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=boost%2Fboost%2Fformat%2Falt_sstream.hpp;h=e236be352663155294336de5b5bf1ae54be60c56;hb=c48091f33a773732fa6c789927e5833e44108d9d;hp=d42755d55df47e12057590447431d2132784bc0d;hpb=2349a51b124cafaf65ca673f8e7fd931f4ba4961;p=lyx.git diff --git a/boost/boost/format/alt_sstream.hpp b/boost/boost/format/alt_sstream.hpp index d42755d55d..e236be3526 100644 --- a/boost/boost/format/alt_sstream.hpp +++ b/boost/boost/format/alt_sstream.hpp @@ -48,6 +48,7 @@ namespace boost { typedef typename compat_traits_type::off_type off_type; typedef Alloc allocator_type; typedef ::std::basic_string string_type; + typedef typename string_type::size_type size_type; typedef ::std::streamsize streamsize; @@ -75,12 +76,12 @@ namespace boost { // 0-copy access : Ch * begin() const; - streamsize size() const; - streamsize cur_size() const; // stop at current pointer + size_type size() const; + size_type cur_size() const; // stop at current pointer Ch * pend() const // the highest position reached by pptr() since creation { return ((putend_ < pptr()) ? pptr() : putend_); } - streamsize pcount() const - { return static_cast( pptr() - pbase()) ;} + size_type pcount() const + { return static_cast( pptr() - pbase()) ;} // copy buffer to string : string_type str() const @@ -131,6 +132,7 @@ namespace boost { basic_altstringbuf > > pbase_type; typedef ::std::basic_string string_type; + typedef typename string_type::size_type size_type; typedef basic_altstringbuf stringbuf_t; public: typedef Alloc allocator_type; @@ -151,9 +153,9 @@ namespace boost { // 0-copy access : Ch * begin() const { return rdbuf()->begin(); } - ::std::streamsize size() const + size_type size() const { return rdbuf()->size(); } - ::std::streamsize cur_size() const // stops at current position + size_type cur_size() const // stops at current position { return rdbuf()->cur_size(); } // copy buffer to string : @@ -161,6 +163,8 @@ namespace boost { { return rdbuf()->str(); } string_type cur_str() const // [pbase, pptr[ { return rdbuf()->cur_str(); } + void str(const string_type& s) + { rdbuf()->str(s); } }; } // N.S. io