Problems in boost/mpl/aux_/template_arity.hpp when BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS is defined on g++ 4.6.3 and boost 1.50

Hi, Please help. I have encountered a problem on gcc 4.6.3 and boost 1.50 when trying to compile my library with extensive usage of boost::mpl and boost::fusion on gcc. It was required to enable customization of the number of template arguments handled by boost::fusion and boost::mpl containers and mpl meta functions. Not surprisingly the code compiles fine in visual studio 2010. whole code can be found here: svn checkout svn://svn.code.sf.net/p/d-injection/code-0/trunk This is how I have altered template arguments count: #define FUSION_MAX_VECTOR_SIZE DI_MAX_NUM_INJECTIONS #define FUSION_MAX_VECTOR_SIZE DI_MAX_NUM_INJECTIONS #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #define BOOST_MPL_LIMIT_VECTOR_SIZE DI_MAX_NUM_INJECTIONS #define BOOST_MPL_LIMIT_SET_SIZE DI_MAX_NUM_INJECTIONS #define BOOST_MPL_LIMIT_METAFUNCTION_ARITY DI_MAX_NUM_INJECTIONS #include <boost/fusion/include/as_vector.hpp> #include <boost/fusion/include/as_set.hpp> #include <boost/fusion/adapted/mpl.hpp> #include <boost/fusion/include/mpl.hpp> #include <boost/fusion/include/for_each.hpp> #include <boost/fusion/include/at_key.hpp> #include <boost/mpl/vector.hpp> #include <boost/mpl/remove.hpp> #include <boost/mpl/inserter.hpp> #include <boost/mpl/transform.hpp> #include <boost/mpl/insert.hpp> #include <boost/mpl/count.hpp> #include <boost/mpl/copy.hpp> #include <boost/mpl/set.hpp> #include <boost/mpl/inherit.hpp> #include <boost/mpl/joint_view.hpp> #include <boost/mpl/contains.hpp> #include <boost/mpl/size.hpp> #undef FUSION_MAX_VECTOR_SIZE #undef FUSION_MAX_SET_SIZE #undef BOOST_MPL_LIMIT_VECTOR_SIZE #undef BOOST_MPL_LIMIT_SET_SIZE #undef BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #undef BOOST_MPL_LIMIT_METAFUNCTION_ARITY And I get this error: In file included from ../../libraries/boost_1_50_0/boost/mpl/aux_/full_lambda.hpp:29:0, from ../../libraries/boost_1_50_0/boost/mpl/lambda.hpp:22, from ../../libraries/boost_1_50_0/boost/mpl/apply.hpp:25, from ../../libraries/boost_1_50_0/boost/mpl/aux_/fold_impl.hpp:19, from ../../libraries/boost_1_50_0/boost/mpl/fold.hpp:20, from ../../libraries/boost_1_50_0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp:12, from ../../libraries/boost_1_50_0/boost/fusion/sequence/intrinsic/size.hpp:16, from ../../libraries/boost_1_50_0/boost/fusion/view/joint_view/joint_view.hpp:15, from ../../libraries/boost_1_50_0/boost/fusion/algorithm/transformation/push_back.hpp:11, from ../../libraries/boost_1_50_0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp:19, from ../../libraries/boost_1_50_0/boost/fusion/view/iterator_range/detail/segments_impl.hpp:13, from ../../libraries/boost_1_50_0/boost/fusion/view/iterator_range/iterator_range.hpp:21, from ../../libraries/boost_1_50_0/boost/fusion/view/iterator_range.hpp:10, from ../../libraries/boost_1_50_0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp:12, from ../../libraries/boost_1_50_0/boost/fusion/sequence/intrinsic/begin.hpp:17, from ../../libraries/boost_1_50_0/boost/fusion/container/vector/vector10.hpp:15, from ../../libraries/boost_1_50_0/boost/fusion/container/vector/vector_fwd.hpp:14, from ../../libraries/boost_1_50_0/boost/fusion/container/vector/vector.hpp:10, from ../../libraries/boost_1_50_0/boost/fusion/container/vector/detail/as_vector.hpp:18, from ../../libraries/boost_1_50_0/boost/fusion/container/vector/convert.hpp:10, from ../../libraries/boost_1_50_0/boost/fusion/include/as_vector.hpp:10, from ./di/detail/variadics.hpp:42, from ./di/subject.hpp:10, from test/abstract_builder_should.hpp:11, from test/main.cpp:6: ../../libraries/boost_1_50_0/boost/mpl/aux_/template_arity.hpp:86:1: error: macro "BOOST_PP_TUPLE_ELEM_E_2" requires 2 arguments, but only 1 given ../../libraries/boost_1_50_0/boost/mpl/aux_/template_arity.hpp:86:1: error: macro "BOOST_PP_SEQ_ELEM_III" requires 2 arguments, but only 1 given ../../libraries/boost_1_50_0/boost/mpl/aux_/template_arity.hpp:86:1: error: macro "BOOST_PP_SEQ_ELEM_III" requires 2 arguments, but only 1 given There are more of course, but the consensus is that all errors are somewhat connected to BOOST_PP_ macros. I've tried to find the reason, but with no luck. Thank you in advance, Adam. -- View this message in context: http://boost.2283326.n4.nabble.com/Problems-in-boost-mpl-aux-template-arity-... Sent from the Boost - Users mailing list archive at Nabble.com.

Hi again, I have found out that this happens when I try to use boost::mpl::inherit. Any ideas? -- View this message in context: http://boost.2283326.n4.nabble.com/Problems-in-boost-mpl-aux-template-arity-... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (2)
-
Adam Lach
-
Alach