[Accumulators] How to define the initial value ?
Hi everyone,
As the code of weighted_sum_impl constructor is
[ in header
On 10/8/2010 8:58 AM, Adrien Todeschini wrote:
How can I define this tagged argument when initializing the accumulator_set ? ( Indeed, weighted_sum_impl constructor is called at this point )
Thanks in advance for your help.
It should be as simple as using the "sample" keyword in the boost::accumulators namespace, like: using namespace boost::accumulators; accumulator_set< int, featurestag::weighted_sum > acc( sample = 42 ) HTH, -- Eric Niebler BoostPro Computing http://www.boostpro.com
It should be as simple as using the "sample" keyword in the boost::accumulators namespace, like:
using namespace boost::accumulators; accumulator_set< int, featurestag::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 !!!
using namespace std;
using namespace boost::accumulators;
typedef accumulator_set
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, featurestag::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
On 10/11/2010 8:05 AM, Adrien Todeschini wrote:
I am using more features, and it seems that we can't use more than 4 tagged arguments !!! <snip> Is that a bug ?
On 10/11/2010 9:39 AM, Eric Niebler wrote:
Sounds like it. Could you try defining BOOST_PARAMETER_MAX_ARITY to be something higher, like 10?
Done, but it does not solve the problem.
The error message from GCC 4.4.3 compiler is :
In file included from /usr/include/boost/accumulators/accumulators.hpp:12,
from
On 10/12/2010 1:15 AM, Adrien Todeschini wrote:
On 10/11/2010 8:05 AM, Adrien Todeschini wrote:
I am using more features, and it seems that we can't use more than 4 tagged arguments !!! <snip> Is that a bug ?
On 10/11/2010 9:39 AM, Eric Niebler wrote:
Sounds like it. Could you try defining BOOST_PARAMETER_MAX_ARITY to be something higher, like 10?
Done, but it does not solve the problem.
The error message from GCC 4.4.3 compiler is : <snip>
Bummer. Can you file a bug at http://svn.boost.org? I don't want this issue to get lost. Thanks, -- Eric Niebler BoostPro Computing http://www.boostpro.com
On 10/12/2010 0:37 PM, Eric Niebler wrote:
Bummer. Can you file a bug at http://svn.boost.org? I don't want this issue to get lost.
Done : svn.boost.org/trac/boost/ticket/4730 By the way, I did not mention that I am using Boost 1.40. Can someone try on the latest release ?
participants (2)
-
Adrien Todeschini
-
Eric Niebler