Re: [Boost-bugs] [Boost C++ Libraries] #10688: Fusion vector error when using Qt

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10688: Fusion vector error when using Qt
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-10-28 06:49:02


#10688: Fusion vector error when using Qt
-------------------------------+------------------------------------
  Reporter: rlayman2000@… | Owner: djowel
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: fusion
   Version: Boost 1.56.0 | Severity: Problem
Resolution: | Keywords: fusion, vector.hpp, qt
-------------------------------+------------------------------------

Comment (by jhunold):

 This is not a fusion bug. Qt's moc has an incomplete c++ parser. Please
 report such bugs to Qt so they can "fix" their parser.

 Workaround:

 Put "#ifndef Q_MOC_RUN" around the fusion includes. moc will then skip the
 includes.
 {{{
 diff --git INDEX:/src/main.cpp WORKDIR:/src/main.cpp
 index 3a8f0a8..7fe69c1 100755
 --- INDEX:/src/main.cpp
 +++ WORKDIR:/src/main.cpp
 @@ -1,5 +1,8 @@
  #include <iostream>
 +
 +#ifndef Q_MOC_RUN
  #include <boost/fusion/include/vector.hpp>
 +#endif

  int main (int argc, char *argv[])
  {
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10688#comment:3>
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:17 UTC