[mpl] [bimap] BOOST_MPL_LIMIT_METAFUNCTION_ARITY issue on g++ 4.6.3 and boost 1.50

Hi, I have already asked for help on Boost.users, but with no luck, see here <http://boost.2283326.n4.nabble.com/Problems-in-boost-mpl-aux-template-arity-hpp-when-BOOST-MPL-CFG-NO-PREPROCESSED-HEADERS-is-defined-o0-td4635249.html#a4635322> . Since then I have managed to reproduce this problem in a simpler case: #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 10 #include <boost/mpl/inherit.hpp> #include <boost/bimap.hpp> struct S0 {}; struct S1 {}; struct S2 {}; struct S3 {}; struct S4 {}; struct S5 {}; template<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5> struct example : boost::mpl::inherit<T0,T1,T2,T3,T4,T5> {}; int main() { example<S0,S1,S2,S3,S4,S5> pasta; return 0; } The weird thing is that it occurs only if bimap.hpp is included. Please help. Thank you in advance, Adam Lach -- View this message in context: http://boost.2283326.n4.nabble.com/boost-mpl-bimap-BOOST-MPL-LIMIT-METAFUNCT... Sent from the Boost - Dev mailing list archive at Nabble.com.

Hi Adam, If you check the include chain you will notice that Bimap is including boost/mpl/lambda.hpp through the lib dependencies. Your example can be reduced to this: #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 9 #include <boost/mpl/lambda.hpp> int main() { return 0; } That fails for me with GCC 4.7.2 and Boost 1.52. It seems that you are hitting the compiler limits. It works if you use 8 as the limit. You can open a ticket in Trac for MPL devs to look into the issue. Best regards Matias

Hi Matias, Thank you for such a quick answer. I will follow your advice and open a ticket. About compiler limitations. Visual compiler (VS 2010) does not seem to have any problems even with BOOST_MPL_LIMIT_METAFUNCTION_ARITY == 100. Would it be possible that there is such a huge difference in capabilities between cl and g++? Best Regards, Adam -- View this message in context: http://boost.2283326.n4.nabble.com/boost-mpl-bimap-BOOST-MPL-LIMIT-METAFUNCT... Sent from the Boost - Dev mailing list archive at Nabble.com.
participants (2)
-
Adam Lach
-
Matias Capeletto