Boost C++ Libraries: Ticket #2522: iostreams/stream_offset_64bit_test fails on QNX 6.4.0 https://svn.boost.org/trac10/ticket/2522 <p> ...with the Dinkumware 5 library. </p> <p> It fails on the first iteration and reports this:<br /> </p> <ul><li>sizeof(fpos_t) = 16<br /> </li><li>sizeof(streamoff) = 4<br /> </li><li>sizeof(stream_offset) = 8<br /> </li></ul><p> ... </p> <p> The constructor of std::streampos (fpos&lt;_Mbstatet&gt;) puts the value in a streamoff so the most significant 32 bits get chopped off. </p> <p> Defining BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS results in this:<br /> positioning.hpp: In function 'std::streampos boost::iostreams::offset_to_position(boost::iostreams::stream_offset)':<br /> positioning.hpp:52: error: no matching function for call to 'std::fpos&lt;_Mbstatet&gt;::fpos(std::mbstate_t, boost::iostreams::stream_offset&amp;)'<br /> iosfwd:32: note: candidates are: std::fpos&lt;_Statetype&gt;::fpos(_Statetype, std::fpos_t) [with _Statetype = _Mbstatet]<br /> iosfwd:27: note: std::fpos&lt;_Statetype&gt;::fpos(std::streamoff) [with _Statetype = _Mbstatet]<br /> iosfwd:23: note: std::fpos&lt;_Mbstatet&gt;::fpos(const std::fpos&lt;_Mbstatet&gt;&amp;) </p> <p> std::fpos_t is defined like this:<br /> struct _Fpost {<br /> </p> <blockquote> <p> _Off64t _Off;<br /> _Mbstatet _Wstate;<br /> </p> </blockquote> <p> } </p> <p> I wrote this simple test:<br /> std::fpos_t fpos = { 100000000000LL, std::mbstate_t() };<br /> std::streampos pos(std::mbstate_t(), fpos);<br /> std::cout &lt;&lt; _FPOSOFF(pos.seekpos()) &lt;&lt; std::endl; </p> <p> It prints 100 billion. Is there a better way to initialize fpos_t? I'm not sure it's correct to use the default value for mbstate_t but offset_to_position() currently does it. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2522 Trac 1.4.3