Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-23947

moc fails to parse BOOST_JOIN macro of boost library

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Duplicate
    • Affects Version/s: 4.8.0
    • Fix Version/s: None
    • Component/s: Build tools: moc
    • Labels:
      None
    • Environment:
      Gentoo Linux
      boost-1.48
      Qt-4.8.0
      gcc-4.6.2

      Description

      boost provides BOOST_JOIN macro:

      //
      // Helper macro BOOST_JOIN:
      // The following piece of macro magic joins the two
      // arguments together, even when one of the arguments is
      // itself a macro (see 16.3.1 in C++ standard). The key
      // is that macro expansion of macro arguments does not
      // occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
      //
      #define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
      #define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
      #define BOOST_DO_JOIN2( X, Y ) X##Y

      This macro is not new in dev-libs/boost:1.48, but it is now used in more
      places.
      Some packages (e.g. sci-chemistry/avogadro) use moc and headers of
      dev-libs/boost.

      The attached test header shows parse error. (A separate bug is that moc
      truncates name of header in error message.)

      $ moc -I/usr/include test.h -o test.moc
      usr/include/boost-1_48/boost/type_traits/detail/has_binary_operator.hp:50:
      Parse error at "BOOST_JOIN"

      Line 50 in
      /usr/include/boost-1_48/boost/type_traits/detail/has_binary_operator.hpp is:

      namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {

      Initial bug report on GentoO Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=401551

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hwoarang Markos Chandras
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes