[prev in list] [next in list] [prev in thread] [next in thread]
List: boost-bugs
Subject: [Boost-bugs] [Boost C++ Libraries] #6631: BOOST_PP_ITERATION_FLAGS(): error: missing binary operator
From: "Boost C++ Libraries" <noreply () lists ! boost ! org>
Date: 2012-02-29 2:49:34
Message-ID: 050.5780b674360357f31473b2cc5e756d08 () lists ! boost ! org
[Download RAW message or body]
#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
Keywords: BOOST_PP_ITERATION_FLAGS |
--------------------------------------+-------------------------------------
With Boost 1.49.0 and GCC, use of BOOST_PP_ITERATION_FLAGS() results in a
compiler error:
{{{
# g++ -I $HOME/usr/rhel6-x86_64/boost_1_49_0/include -I. -o file -O2
file.cpp
In file included from file.cpp:1:0:
file.h:19:1: error: missing binary operator before token "("
file.h:24:1: error: missing binary operator before token "("
}}}
As a reproducable test case, I compiled the example given in the
Boost.Preprocessor documentation:
{{{
// 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_1 (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
#elif BOOST_PP_ITERATION_DEPTH() == 1 \
&& BOOST_PP_ITERATION_FLAGS() == 0x0001 \
/**/
#elif BOOST_PP_ITERATION_DEPTH() == 1 \
&& BOOST_PP_ITERATION_FLAGS() == 0x0002 \
/**/
#endif
}}}
{{{
// file.cpp
#include "file.h"
int main() {}
}}}
Both GCC 4.4 and GCC 4.6 fail to compile the example using Boost 1.49.0.
The above code compiles fine using Boost 1.48.0.
g++ (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
g++ (GCC) 4.6.2 20110728 (prerelease)
--
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6631>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
_______________________________________________
Boost-bugs mailing list
Boost-bugs@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic