Boost C++ Libraries: Ticket #11146: iostreams seekpos/seekoff must not throw exceptions https://svn.boost.org/trac10/ticket/11146 <p> Currently, <code>direct_streambuf&lt;T, Tr&gt;::seek_impl</code> throws <code>bad_seek()</code> exception on invalid input. </p> <p> The current standard draft N4296 says in section 27.8.2.4 about <code>seekoff</code>: </p> <p> <em>If the positioning operation fails, or if the constructed object cannot represent the resultant stream position, the return value is pos_type(off_type(-1)).</em> </p> <p> At least the MSVC STL implementation does not expect pubseekoff/seekoff to throw, thus does not catch the exception and the bad_seek() exception may leak to the caller even though ios_base::exceptions() is 0. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11146 Trac 1.4.3