X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=boost%2Fboost%2Fformat%2Falt_sstream_impl.hpp;h=9975e4f96b0a325b28b7ad65441b1d38deb56fd3;hb=c48091f33a773732fa6c789927e5833e44108d9d;hp=ee9c3abd1eabca3812a5d84e76c4e7e4bbda2093;hpb=376aaac146989c2060f4159a16c7e8238b400088;p=lyx.git diff --git a/boost/boost/format/alt_sstream_impl.hpp b/boost/boost/format/alt_sstream_impl.hpp index ee9c3abd1e..9975e4f96b 100644 --- a/boost/boost/format/alt_sstream_impl.hpp +++ b/boost/boost/format/alt_sstream_impl.hpp @@ -37,7 +37,12 @@ namespace boost { str (const string_type& s) { size_type sz=s.size(); if(sz != 0 && mode_ & (::std::ios_base::in | ::std::ios_base::out) ) { +#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC + void *vd_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); + Ch *new_ptr = static_cast(vd_ptr); +#else Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); +#endif // if this didnt throw, we're safe, update the buffer dealloc(); sz = s.copy(new_ptr, sz); @@ -107,7 +112,7 @@ namespace boost { return pos_type(off_type(-1)); if(eback() <= off+gptr() && off+gptr() <= putend_ ) { // set gptr - streambuf_t::gbump(off); + streambuf_t::gbump(static_cast(off)); if(which & ::std::ios_base::out && pptr() != NULL) // update pptr to match gptr streambuf_t::pbump(static_cast(gptr()-pptr())); @@ -125,7 +130,7 @@ namespace boost { return pos_type(off_type(-1)); if(pbase() <= off+pptr() && off+pptr() <= putend_) // set pptr - streambuf_t::pbump(off); + streambuf_t::pbump(static_cast(off)); else off = off_type(-1); } @@ -140,7 +145,7 @@ namespace boost { typename basic_altstringbuf::pos_type basic_altstringbuf:: seekpos (pos_type pos, ::std::ios_base::openmode which) { - off_type off = off_type(pos); // operation guaranteed by ยง27.4.3.2 table 88 + off_type off = off_type(pos); // operation guaranteed by 27.4.3.2 table 88 if(pptr() != NULL && putend_ < pptr()) putend_ = pptr(); if(off != off_type(-1)) { @@ -221,6 +226,10 @@ namespace boost { typename basic_altstringbuf::int_type basic_altstringbuf:: overflow (int_type meta) { +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4996) +#endif if(compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) return compat_traits_type::not_eof(meta); // nothing to do else if(pptr() != NULL && pptr() < epptr()) { @@ -245,7 +254,12 @@ namespace boost { add_size /= 2; if(0 < add_size) { new_size += add_size; +#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC + void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); + newptr = static_cast(vdptr); +#else newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); +#endif } if(0 < prev_size) @@ -276,6 +290,9 @@ namespace boost { streambuf_t::sputc(compat_traits_type::to_char_type(meta)); return meta; } +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif } // -end overflow(..)