Boost C++ Libraries: Ticket #4968: Syntax error in boost::exception_detail::diagnostic_information_impl https://svn.boost.org/trac10/ticket/4968 <p> The following lines (line 139/140) in boost/exception/diagnostic_information.hpp gives a syntax error when trying to instrument code that includes the file using <a class="missing wiki">TestCocoon</a> 1.4.0 with Visual C++ 9.0: </p> <pre class="wiki">tmp &lt;&lt; std::string("Dynamic exception type: ") &lt;&lt; units::detail::demangle((be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).type_.name()) &lt;&lt; '\n'; </pre><p> Since BOOST_EXCEPTION_DYNAMIC_TYPEID is a macro that evaluates to ::..., the resulting ::: causes a syntax error (it appears to be fine when using plain Visual C++ 9.0). In any case, it would be safer to either change the macro or this use of it to by adding parentheses: </p> <pre class="wiki">tmp &lt;&lt; std::string("Dynamic exception type: ") &lt;&lt; units::detail::demangle((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_.name()) &lt;&lt; '\n'; </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4968 Trac 1.4.3 Emil Dotchevski Thu, 09 Dec 2010 06:25:55 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4968#comment:1 https://svn.boost.org/trac10/ticket/4968#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> </ul> <p> Fixed, see release branch revision number 67127. </p> Ticket