Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12426: boost/preprocessor/seq/for_each_i.hpp fails on gcc 5.4.0 and appleclang 7.3.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-09-20 21:38:07
#12426: boost/preprocessor/seq/for_each_i.hpp fails on gcc 5.4.0 and appleclang
7.3.0
-------------------------------+---------------------------
Reporter: mjtruog@⦠| Owner: no-maintainer
Type: Bugs | Status: new
Milestone: To Be Determined | Component: preprocessor
Version: Boost 1.58.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+---------------------------
Comment (by mjtruog@â¦):
The diff below solves the problem, by bringing the code for the arity 0
case back to the state it was in at version 1.48 (when compared to 1.58):
{{{
--- /usr/include/boost/preprocessor/tuple/to_seq.hpp 2016-09-20
13:34:52.926120462 -0700
+++ /usr/include/boost/preprocessor/tuple/to_seq.hpp 2016-09-20
13:35:02.516377864 -0700
@@ -49,7 +49,7 @@
# endif
#
/* An empty array can be passed */
-# define BOOST_PP_TUPLE_TO_SEQ_0() ()
+# define BOOST_PP_TUPLE_TO_SEQ_0()
#
# define BOOST_PP_TUPLE_TO_SEQ_1(e0) (e0)
# define BOOST_PP_TUPLE_TO_SEQ_2(e0, e1) (e0)(e1)
}}}
To avoid this bug in BOOST_PP_TUPLE_TO_SEQ I used the work-around below:
{{{
#include <boost/preprocessor/list/for_each.hpp>
#include <boost/preprocessor/tuple/to_list.hpp>
#define TUPLE_TO_SEQ_E(r, data, elem) (elem)
#define TUPLE_TO_SEQ(I, T) \
BOOST_PP_LIST_FOR_EACH(TUPLE_TO_SEQ_E, _, BOOST_PP_TUPLE_TO_LIST(I,
T))
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12426#comment:1> 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:20 UTC