Boost logo

Boost :

Subject: [boost] [phoenix] not playing nice with other libs
From: Eric Niebler (eric.niebler_at_[hidden])
Date: 2011-05-02 06:54:55


The following trivial program fails to compile:

  #include <boost/phoenix/core/limits.hpp>
  #include <boost/numeric/conversion/converter.hpp>

It generates the following:

In file included from
../../../../branches/release/boost/numeric/conversion/detail/is_subranged.hpp:17,
                 from
../../../../branches/release/boost/numeric/conversion/detail/conversion_traits.hpp:21,
                 from
../../../../branches/release/boost/numeric/conversion/conversion_traits.hpp:13,
                 from
../../../../branches/release/boost/numeric/conversion/converter.hpp:13,
                 from main.cpp:2:
../../../../branches/release/boost/mpl/multiplies.hpp:38: error: wrong
number of template arguments (12, should be 5)
../../../../branches/release/boost/mpl/aux_/preprocessed/gcc/times.hpp:68:
error: provided for ‘temp
late<class N1, class N2, class N3, class N4, class N5> struct
boost::mpl::times’

Phoenix is changing the following fundamental constants:

  BOOST_PROTO_MAX_ARITY
  BOOST_MPL_LIMIT_METAFUNCTION_ARITY
  BOOST_PROTO_MAX_LOGICAL_ARITY
  BOOST_RESULT_OF_NUM_ARGS

IMO, Phoenix shouldn't be touching these. It should work as best it can
with the default values. Users who are so inclined can change them.

--
Eric Niebler
BoostPro Consulting
www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk