Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2004-11-22 11:37:11

On Mon, 22 Nov 2004 16:00:26 +0100, Pavol Droba wrote
> Hi,
> In the Date-Time library, date_duration class provides a set of
> basic arithmetic operations. Among others there is multiplication
> and division.
> Current interface supports only integer factors. Sometimes this
> precision is not sufficient. I have actualy came accross such a
> occasion. I need to adjust the duration using a multiplier from
> range <0,1>. Currenly it is not feasible, and I have to workaroud it
> by converting to microseconds and back.
> Would it be possible to alter the interface, so it will be able to
> use real factors?

Well date_duration is meant only to represent whole days, so even if this
could be supported you would get either rounding or truncation errors. So
obviously you are making some decisions on this in your user code. Also, is
there a reason why you aren't just using a time_duration?


Boost list run by bdawes at, gregod at, cpdaniel at, john at