Boost C++ Libraries: Ticket #5087: test_utf8_codecvt.cpp.patch fixing comparison with wrong type https://svn.boost.org/trac10/ticket/5087 <p> Comparison of <code>WEOF</code> against <code>wchar_t</code> value is non-portable. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5087 Trac 1.4.3 hstong@… Tue, 18 Jan 2011 22:02:33 GMT attachment set https://svn.boost.org/trac10/ticket/5087 https://svn.boost.org/trac10/ticket/5087 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_utf8_codecvt.cpp.patch</span> </li> </ul> <p> patch libs/serialization/test/test_utf8_codecvt.cpp to avoid WEOF comparison with wchar_t </p> Ticket Robert Ramey Sun, 23 Jan 2011 02:37:24 GMT <link>https://svn.boost.org/trac10/ticket/5087#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5087#comment:1</guid> <description> <p> hmmm - could you cite some reference to indicate what wint_t would be preferred to wchar_t? I've never heard of wint_t - not that that means anything. Something makes me think this would be dependent on the standard library or compiler used. </p> <p> Robert Ramey </p> </description> <category>Ticket</category> </item> <item> <author>hstong@…</author> <pubDate>Sun, 23 Jan 2011 05:04:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5087#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5087#comment:2</guid> <description> <p> The type of <code>WEOF</code> according to C99 is <code>wint_t</code>. </p> <p> <code>wint_t</code> is the <code>int_type</code> for <code>char_traits&lt;wchar_t&gt;</code> as specified by C++03. As such, it is the return type for <code>basic_istream&lt;wchar_t&gt;::get()</code>. </p> <p> As per C99, <code>wint_t</code> is required to be able to hold an additional value (<code>WEOF</code>) aside from the ones that <code>wchar_t</code> are required to. It follows that <code>WEOF</code> may not be representable in a <code>wchar_t</code>. </p> <p> A draft copy of C1x is available here: <a class="ext-link" href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1494.pdf"><span class="icon">​</span>http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1494.pdf</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Tue, 25 Jan 2011 21:40:52 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5087#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5087#comment:3</guid> <description> <p> OK - you've convinced me - good job. </p> <p> I'll role in this change. It won't make for 1.46 though - thanks again. </p> <p> Robert Ramey </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Sat, 19 Feb 2011 17:12:57 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5087#comment:4 https://svn.boost.org/trac10/ticket/5087#comment:4 <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> </ul> Ticket