]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/format/alt_sstream.hpp
Don't allow newline characters in document settings.
[lyx.git] / boost / boost / format / alt_sstream.hpp
index d42755d55df47e12057590447431d2132784bc0d..e236be352663155294336de5b5bf1ae54be60c56 100644 (file)
@@ -48,6 +48,7 @@ namespace boost {
             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;
 
@@ -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<streamsize>( pptr() - pbase()) ;}
+            size_type pcount() const 
+                { return static_cast<size_type>( pptr() - pbase()) ;}
 
             // copy buffer to string :
             string_type str() const 
@@ -131,6 +132,7 @@ namespace boost {
                 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;
@@ -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