[Boost-bugs] [Boost C++ Libraries] #11718: No debug output when karma.hpp is included before qi.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #11718: No debug output when karma.hpp is included before qi.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-10-11 06:28:16


#11718: No debug output when karma.hpp is included before qi.hpp
------------------------------+---------------------
 Reporter: anonymous | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------
 In case karma.hpp is included macro
 karma\nonterminal\debug_handler.hpp::BOOST_SPIRIT_DEBUG_NODE(...) is
 defined.

 In case qi.hpp is included macro
 qi\nonterminal\debug_handler.hpp::BOOST_SPIRIT_DEBUG_NODE(...) is defined.

 both macros are secured by !defined(BOOST_SPIRIT_DEBUG_NODE). Therefore
 macro is defined only once which is fine.

 In case BOOST_SPIRIT_DEBUG is defined expectation is that both macro
 implementations define equal code. But this is not the case:

 - If karma.hpp is included before qi.hpp resulting code is:
   #define BOOST_SPIRIT_DEBUG_NODE(r) r.name(#r);

 - If qi.hpp is included before karma.hpp resulting code is:
   #define BOOST_SPIRIT_DEBUG_NODE(r) r.name(#r); debug(r)

 Therefore debug output is only available when header files are included in
 the right order. A simple macro extension should solve the issue.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11718>
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:19 UTC