Boost logo

Boost Users :

From: Peter Klotz (peter.klotz_at_[hidden])
Date: 2008-06-27 01:02:53

time_duration in Boost 1.35.0 has an is_negative() method.

I need exactly the opposite:

time_duration td;
while (td.is_positive())
        // reduce td in some way

I am aware, that I can use td.ticks()>0, but since is_negative() already
exists, it would be nice to have also the following methods for
completeness and symmetry:

bool time_duration::is_positive() const
bool time_duration::is_zero() const

So for all non special value time_duration instances one of the above
methods would return true, the other two false.

Best regards, Peter.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at