Boost logo

Boost Users :

Subject: Re: [Boost-users] [accumulators] Help required for using UDT as Sample
From: Eric Niebler (eric_at_[hidden])
Date: 2009-02-25 00:07:42


dhruva wrote:
> I have my own data type, time stamp and value. I would like to get the min Sample with corresponding time stamp.
>
> class time_val {
> public:
> time_t _time;
> double _value;
>
> /* I have overloaded operators: <, >, ==, != */
> /* Have provided copy constructor */
> };
>
> When I try:
> accumulator_set< time_val, features <tag::min> > acc;
>
> I get a whole lot of compilation errors. Is there any way I can make a UDT as a sample?

That should just work. Can you provide a complete example?

-- 
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