/usr/include/boost/detail
NameSizeModeActions
winapi/-0755rm
algorithm.hpp28980644editdlrm
allocator_utilities.hpp47900644editdlrm
atomic_count.hpp6180644editdlrm
basic_pointerbuf.hpp44690644editdlrm
binary_search.hpp62390644editdlrm
bitmask.hpp30330644editdlrm
call_traits.hpp43240644editdlrm
catch_exceptions.hpp56770644editdlrm
compressed_pair.hpp170020644editdlrm
container_fwd.hpp51600644editdlrm
fenv.hpp32060644editdlrm
has_default_constructor.hpp9350644editdlrm
identifier.hpp31780644editdlrm
indirect_traits.hpp44230644editdlrm
interlocked.hpp142580644editdlrm
is_incrementable.hpp30710644editdlrm
is_sorted.hpp14320644editdlrm
is_xxx.hpp12500644editdlrm
iterator.hpp11460644editdlrm
lcast_precision.hpp60890644editdlrm
lightweight_main.hpp12260644editdlrm
lightweight_mutex.hpp6300644editdlrm
lightweight_test.hpp4360644editdlrm
lightweight_test_report.hpp22230644editdlrm
lightweight_thread.hpp8110644editdlrm
named_template_params.hpp61240644editdlrm
no_exceptions_support.hpp5700644editdlrm
numeric_traits.hpp54900644editdlrm
ob_compressed_pair.hpp163990644editdlrm
quick_allocator.hpp6060644editdlrm
reference_content.hpp24430644editdlrm
scoped_enum_emulation.hpp5410644editdlrm
select_type.hpp11300644editdlrm
sp_typeinfo.hpp8570644editdlrm
templated_streams.hpp22420644editdlrm
utf8_codecvt_facet.hpp77450644editdlrm
utf8_codecvt_facet.ipp95780644editdlrm
workaround.hpp3350644editdlrm
Edit: /usr/include/boost/detail/basic_pointerbuf.hpp (4469B)
//----------------------------------------------------------------------------- // boost detail/templated_streams.hpp header file // See http://www.boost.org for updates, documentation, and revision history. //----------------------------------------------------------------------------- // // Copyright (c) 2013 John Maddock, Antony Polukhin // // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_DETAIL_BASIC_POINTERBUF_HPP #define BOOST_DETAIL_BASIC_POINTERBUF_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once #endif #include "boost/config.hpp" #include namespace boost { namespace detail { // // class basic_pointerbuf: // acts as a stream buffer which wraps around a pair of pointers: // template class basic_pointerbuf : public BufferT { protected: typedef BufferT base_type; typedef basic_pointerbuf this_type; typedef typename base_type::int_type int_type; typedef typename base_type::char_type char_type; typedef typename base_type::pos_type pos_type; typedef ::std::streamsize streamsize; typedef typename base_type::off_type off_type; public: basic_pointerbuf() : base_type() { this_type::setbuf(0, 0); } const charT* getnext() { return this->gptr(); } #ifndef BOOST_NO_USING_TEMPLATE using base_type::pptr; using base_type::pbase; #else charT* pptr() const { return base_type::pptr(); } charT* pbase() const { return base_type::pbase(); } #endif protected: // VC mistakenly assumes that `setbuf` and other functions are not referenced. // Marking those functions with `inline` suppresses the warnings. // There must be no harm from marking virtual functions as inline: inline virtual // call can be inlined ONLY when the compiler knows the "exact class". inline base_type* setbuf(char_type* s, streamsize n) BOOST_OVERRIDE; inline typename this_type::pos_type seekpos(pos_type sp, ::std::ios_base::openmode which) BOOST_OVERRIDE; inline typename this_type::pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) BOOST_OVERRIDE; private: basic_pointerbuf& operator=(const basic_pointerbuf&); basic_pointerbuf(const basic_pointerbuf&); }; template BufferT* basic_pointerbuf::setbuf(char_type* s, streamsize n) { this->setg(s, s, s + n); return this; } template typename basic_pointerbuf::pos_type basic_pointerbuf::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) { typedef typename boost::int_t::least cast_type; if(which & ::std::ios_base::out) return pos_type(off_type(-1)); std::ptrdiff_t size = this->egptr() - this->eback(); std::ptrdiff_t pos = this->gptr() - this->eback(); charT* g = this->eback(); switch(static_cast(way)) { case ::std::ios_base::beg: if((off < 0) || (off > size)) return pos_type(off_type(-1)); else this->setg(g, g + off, g + size); break; case ::std::ios_base::end: if((off < 0) || (off > size)) return pos_type(off_type(-1)); else this->setg(g, g + size - off, g + size); break; case ::std::ios_base::cur: { std::ptrdiff_t newpos = static_cast(pos + off); if((newpos < 0) || (newpos > size)) return pos_type(off_type(-1)); else this->setg(g, g + newpos, g + size); break; } default: ; } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244) #endif return static_cast(this->gptr() - this->eback()); #ifdef BOOST_MSVC #pragma warning(pop) #endif } template typename basic_pointerbuf::pos_type basic_pointerbuf::seekpos(pos_type sp, ::std::ios_base::openmode which) { if(which & ::std::ios_base::out) return pos_type(off_type(-1)); off_type size = static_cast(this->egptr() - this->eback()); charT* g = this->eback(); if(off_type(sp) <= size) { this->setg(g, g + off_type(sp), g + size); } return pos_type(off_type(-1)); } }} // namespace boost::detail #endif // BOOST_DETAIL_BASIC_POINTERBUF_HPP