[Boost-bugs] [Boost C++ Libraries] #4968: Syntax error in boost::exception_detail::diagnostic_information_impl

Subject: [Boost-bugs] [Boost C++ Libraries] #4968: Syntax error in boost::exception_detail::diagnostic_information_impl
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-08 21:50:02


#4968: Syntax error in boost::exception_detail::diagnostic_information_impl
--------------------------------------+-------------------------------------
 Reporter: simon.giesecke@… | Owner: emildotchevski
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: exception
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
--------------------------------------+-------------------------------------
 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 TestCocoon 1.4.0
 with Visual C++ 9.0:
 {{{
 tmp << std::string("Dynamic exception type: ") <<
 units::detail::demangle((be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).type_.name())
 << '\n';
 }}}

 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:

 {{{
 tmp << std::string("Dynamic exception type: ") <<
 units::detail::demangle((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_.name())
 << '\n';
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4968>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC