Boost logo

Boost :

Subject: Re: [boost] [phoenix] not playing nice with other libs
From: Cromwell Enage (sponage_at_[hidden])
Date: 2011-05-02 15:17:11


--- On Mon, 5/2/11, Thomas Heller wrote: > On Mon, May 2, 2011 at 12:54 PM, Eric Niebler wrote: > > 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, > This problem is well known. As of now I have no clue how > to fix it properly. What I usually do instead of changing the values of existing constants is to start each header file with, for each fundamental constant used, what I'll dub a "constant guard": #if BOOST_PP_LESS(BOOST_PROTO_MAX_ARITY, SOME_MINIMUM_VALUE) #error Please set BOOST_PROTO_MAX_ARITY to SOME_MINIMUM_VALUE or higher #endif IOW, I'm just passing the buck to the library user or to the application developer. HTH, Cromwell D. Enage


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