Re: [Boost-bugs] [Boost C++ Libraries] #6631: BOOST_PP_ITERATION_FLAGS(): error: missing binary operator before token "("

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6631: BOOST_PP_ITERATION_FLAGS(): error: missing binary operator before token "("
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-07 04:15:45


#6631: BOOST_PP_ITERATION_FLAGS(): error: missing binary operator before token "("
--------------------------------+-------------------------------------------
  Reporter: peter@… | Owner: no-maintainer
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: preprocessor
   Version: Boost 1.49.0 | Severity: Regression
Resolution: | Keywords: BOOST_PP_ITERATION_FLAGS
--------------------------------+-------------------------------------------

Comment (by Blake-R <blake-r@…>):

 Yes, it helps. But me interesting why?

 Replying to [comment:2 patrick.hartling@…]:
> Modifying `file.h` to be the following fixes the problem for me (testing
 with GCC 4.4 and Visual C++ 9.0 SP1):
>
> {{{
> // file.h
> #if !BOOST_PP_IS_ITERATING
>
> #ifndef FILE_H_
> #define FILE_H_
>
> #include <boost/preprocessor/iteration/iterate.hpp>
>
> // 1st iteration:
> #define BOOST_PP_ITERATION_PARAMS_2 (4, (1, 10, "file.h", 0x0001))
> #include BOOST_PP_ITERATE()
>
> // 2nd iteration:
> #define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 10, "file.h", 0x0002))
> #include BOOST_PP_ITERATE()
>
> #endif
>
> #else
> #if BOOST_PP_ITERATION_DEPTH() == 1 \
> && BOOST_PP_ITERATION_FLAGS() == 0x0001 \
> /**/
>
> struct BOOST_PP_CAT(Y, BOOST_PP_ITERATION()) { };
>
> #elif BOOST_PP_ITERATION_DEPTH() == 1 \
> && BOOST_PP_ITERATION_FLAGS() == 0x0002 \
> /**/
>
> struct BOOST_PP_CAT(Z, BOOST_PP_ITERATION()) { };
>
> #endif
> #endif
> }}}
>
> The difference in structure is like this:
>
> {{{
> #if !BOOST_PP_IS_ITERATING
> // ...
> #else
> #if BOOST_PP_ITERATION_DEPTH() == 1 \
> && BOOST_PP_ITERATION_FLAGS() == 0x0001 \
> /**/
> // ...
> #endif
> #endif
> }}}

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