Boost C++ Libraries: Ticket #2731: std::basic_fstream open for wpath assigns mode https://svn.boost.org/trac10/ticket/2731 <p> The open behavior of fstream for wpath seems to be different than path. The mode is assigned input and output flags in the wpath version. </p> <p> Is this correct behaviour? </p> <p> This is the best I could do for a diff: </p> <p> \boost\filesystem\fstream.hpp ==== <strong></strong><strong></strong><strong></strong><strong>* </strong>* 467,473 <strong></strong> </p> <blockquote> <p> { </p> <blockquote> <p> std::basic_fstream&lt;charT,traits&gt;::open( </p> <blockquote> <p> detail::path_proxy( file_ph.external_file_string(), </p> </blockquote> </blockquote> </blockquote> <p> ! mode ).c_str(), mode | std::ios_base::in | std::ios_base::out ); </p> <blockquote> <p> } </p> </blockquote> <p> </p> <blockquote> <p> template &lt;class charT, class traits&gt; </p> </blockquote> <p> --- 467,474 ---- </p> <blockquote> <p> { </p> <blockquote> <p> std::basic_fstream&lt;charT,traits&gt;::open( </p> <blockquote> <p> detail::path_proxy( file_ph.external_file_string(), </p> </blockquote> </blockquote> </blockquote> <p> ! mode ).c_str(), mode ); <em>| std::ios_base::in | std::ios_base::out ); ! </em> Note: this change seems more consistent with the non-wpath version. </p> <blockquote> <p> } </p> </blockquote> <p> </p> <blockquote> <p> template &lt;class charT, class traits&gt; </p> </blockquote> <p> <strong></strong><strong></strong><strong></strong><strong>* </strong>* 476,482 <strong></strong> </p> <blockquote> <p> { </p> <blockquote> <p> std::basic_fstream&lt;charT,traits&gt;::open( </p> <blockquote> <p> detail::path_proxy( file_ph.external_file_string(), </p> </blockquote> </blockquote> </blockquote> <p> ! mode ).c_str(), mode | std::ios_base::in | std::ios_base::out ); </p> <blockquote> <p> } </p> </blockquote> <p> </p> <blockquote> <p> # endif </p> </blockquote> <p> --- 477,485 ---- </p> <blockquote> <p> { </p> <blockquote> <p> std::basic_fstream&lt;charT,traits&gt;::open( </p> <blockquote> <p> detail::path_proxy( file_ph.external_file_string(), </p> </blockquote> </blockquote> </blockquote> <p> ! mode ).c_str(), ! mode ); <em>| std::ios_base::in | std::ios_base::out ); ! </em> Note: this change seems more consistent with the non-wpath version. </p> <blockquote> <p> } </p> </blockquote> <p> </p> <blockquote> <p> # endif </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2731 Trac 1.4.3 Beman Dawes Sun, 13 Jun 2010 20:17:52 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2731#comment:1 https://svn.boost.org/trac10/ticket/2731#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> This was fixed by ticket 3884. I'm not sure why it wasn't fixed at the time 2731 was opened. </p> <p> Thanks, </p> <p> --Beman </p> Ticket