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<Ch *>(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);
return pos_type(off_type(-1));
if(eback() <= off+gptr() && off+gptr() <= putend_ ) {
// set gptr
- streambuf_t::gbump(off);
+ streambuf_t::gbump(static_cast<int>(off));
if(which & ::std::ios_base::out && pptr() != NULL)
// update pptr to match gptr
streambuf_t::pbump(static_cast<int>(gptr()-pptr()));
return pos_type(off_type(-1));
if(pbase() <= off+pptr() && off+pptr() <= putend_)
// set pptr
- streambuf_t::pbump(off);
+ streambuf_t::pbump(static_cast<int>(off));
else
off = off_type(-1);
}
typename basic_altstringbuf<Ch, Tr, Alloc>::pos_type
basic_altstringbuf<Ch, Tr, Alloc>::
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)) {
typename basic_altstringbuf<Ch, Tr, Alloc>::int_type
basic_altstringbuf<Ch, Tr, Alloc>::
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()) {
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<Ch *>(vdptr);
+#else
newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+#endif
}
if(0 < prev_size)
streambuf_t::sputc(compat_traits_type::to_char_type(meta));
return meta;
}
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
}
// -end overflow(..)