Boost C++ Libraries: Ticket #2986: Boost.Filesystem warnings when wchar_t is 16-bit are a problem when warnings are treated as errors https://svn.boost.org/trac10/ticket/2986 <p> When wchar_t is 16-bit, some code in Boost.Filesystem can trigger range comparison warnings: </p> <p> src/libs/detail/utf8_codecvt_facet.cpp:245: warning: comparison is always true due to limited range of data type src/libs/detail/utf8_codecvt_facet.cpp:248: warning: comparison is always true due to limited range of data type src/libs/detail/utf8_codecvt_facet.cpp:251: warning: comparison is always true due to limited range of data type </p> <p> There is a note near this code that says to ignore these warnings if wchar_t is UCS2 (16-bit), but if the compiler is treating (all) warnings as errors, this is difficult to do automatically. </p> <p> Something along the lines of the attached patch should allow the code to work properly in both cases. An alternative solution would be to completely remove the specialization if wchar_t is 16-bit (i.e. wrap the whole function in the #ifdef guards). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2986 Trac 1.4.3 spencer@… Sun, 03 May 2009 23:02:57 GMT attachment set https://svn.boost.org/trac10/ticket/2986 https://svn.boost.org/trac10/ticket/2986 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">52-fix-wchar_t-ucs2.diff</span> </li> </ul> <p> Patch showing one way to remove the warnings </p> Ticket Beman Dawes Sat, 30 May 2009 15:00:53 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/2986#comment:1 https://svn.boost.org/trac10/ticket/2986#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">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.39.0</span> → <span class="trac-field-new">Boost 1.40.0</span> </li> </ul> <p> Patch applied. Thanks! </p> <p> --Beman </p> Ticket