Boost C++ Libraries: Ticket #7493: compile fail on intel-linux-12.1.3.0x because of bug on explicit bool conversion https://svn.boost.org/trac10/ticket/7493 <p> The following code fails to compile with intel-linux-12.1.3.0x </p> <pre class="wiki"> typename std::basic_ostream&lt;CharT, Traits&gt;::sentry opfx(os); if (opfx) { </pre><p> with the message </p> <pre class="wiki">../../../boost/chrono/io/duration_io.hpp(130): error: expression must have bool type (or be convertible to bool) if (opfx) </pre><p> even if sentry defines an explicit bool conversion. </p> <p> A workaround to this issue is needed. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7493 Trac 1.4.3 viboes Wed, 10 Oct 2012 22:44:44 GMT status, description changed https://svn.boost.org/trac10/ticket/7493#comment:1 https://svn.boost.org/trac10/ticket/7493#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/7493?action=diff&amp;version=1">diff</a>) </li> </ul> <p> It is enough to do the explicit conversion </p> <pre class="wiki"> typename std::basic_ostream&lt;CharT, Traits&gt;::sentry opfx(os); if (bool(opfx)) { </pre> Ticket viboes Wed, 10 Oct 2012 23:05:49 GMT <link>https://svn.boost.org/trac10/ticket/7493#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7493#comment:2</guid> <description> <p> Committed in trunk revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/80949" title="Chrono: Added some warning removal on intel and fix explicit bool ...">[80949]</a><a class="changeset" href="https://svn.boost.org/trac10/changeset/80950" title="Chrono: added forgotten fix for explicit bool conversion issue">[80950]</a><a class="changeset" href="https://svn.boost.org/trac10/changeset/80956" title="Chrono: document fix for 7493">[80956]</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Wed, 10 Oct 2012 23:06:17 GMT</pubDate> <title>description changed https://svn.boost.org/trac10/ticket/7493#comment:3 https://svn.boost.org/trac10/ticket/7493#comment:3 <ul> <li><strong>description</strong> modified (<a href="/trac10/ticket/7493?action=diff&amp;version=3">diff</a>) </li> </ul> Ticket viboes Sun, 21 Oct 2012 09:06:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7493#comment:4 https://svn.boost.org/trac10/ticket/7493#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Merged from trunk <a class="changeset" href="https://svn.boost.org/trac10/changeset/80949" title="Chrono: Added some warning removal on intel and fix explicit bool ...">[80949]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/80950" title="Chrono: added forgotten fix for explicit bool conversion issue">[80950]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/80956" title="Chrono: document fix for 7493">[80956]</a> in revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/80964" title="Chrono: Merge 80949,80950,80956">[80964]</a> </p> Ticket