typedef typename compat_traits_type::off_type off_type;
typedef Alloc allocator_type;
typedef ::std::basic_string<Ch, Tr, Alloc> string_type;
+ typedef typename string_type::size_type size_type;
typedef ::std::streamsize streamsize;
// 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<streamsize>( pptr() - pbase()) ;}
+ size_type pcount() const
+ { return static_cast<size_type>( pptr() - pbase()) ;}
// copy buffer to string :
string_type str() const
basic_altstringbuf<Ch,Tr, Alloc> > >
pbase_type;
typedef ::std::basic_string<Ch, Tr, Alloc> string_type;
+ typedef typename string_type::size_type size_type;
typedef basic_altstringbuf<Ch, Tr, Alloc> stringbuf_t;
public:
typedef Alloc allocator_type;
// 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 :
{ 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