Boost logo

Boost Users :

Subject: Re: [Boost-users] [posix_time] time_duration operator/() overload
From: Norbert Wenzel (n_wenzel_at_[hidden])
Date: 2010-03-05 13:13:49


On 03/05/2010 01:05 PM, Igor R wrote:
>> What I'm currently doing is computing the proportions via
>>
>> time_duration::total_*()
>>
>> which works fine, but leads to some coding effort, since I'll have to cast
>> one result to a real number to avoid integer division and some checks to prevent /0.
>
> Well, you can do all this work once - in the overloaded operator :).

I was just wondering, if this overload was left out on purpose. From
your answer I'd guess it was no purpose, so I'll write this one myself
the next time I'll need it.

thanks,
Norbert


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