Boost logo

Boost Users :

Subject: Re: [Boost-users] [Accumulators] How to define the initial value ?
From: Eric Niebler (eric_at_[hidden])
Date: 2010-10-11 12:39:03


On 10/11/2010 8:05 AM, Adrien Todeschini wrote:
>> It should be as simple as using the "sample" keyword in the
>> boost::accumulators namespace, like:
>>
>> using namespace boost::accumulators;
>> accumulator_set< int, features<tag::weighted_sum> > acc( sample = 42 )
>
> Thanks Eric. Indeed, it works !
> But my problem was actually independent of this.
> I am using more features, and it seems that we can't use more than 4
> tagged arguments !!!
<snip>
>
> I wanted acc2, so I thought my syntax using the "sample" keyword was
> wrong but it was not, as acc3 and acc4 do compile.
> Is that a bug ?
<snip>

Sounds like it. Could you try defining BOOST_PARAMETER_MAX_ARITY to be
something higher, like 10?

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net