Boost logo

Boost :

Subject: Re: [boost] [chrono] Interoperability with ICL and common concepts
From: Howard Hinnant (howard.hinnant_at_[hidden])
Date: 2011-03-16 12:00:57

On Mar 16, 2011, at 11:48 AM, Vicente Botet wrote:

> Joachim Faulhaber wrote:
>> (2) An increment/decrement on the least steppable unit
>> (3) A difference_type declaration
>> Very simple, very little effort, great benefit for instant
>> interoperability, not only with ICL but with all generic libraries
>> that depend on this minimal set of fundamental information.
> Joachim,
> could you create a ticket for (3). I don't think this is too disruptive.
> For (2), I will rephrase your least steppable unit as follows. The semantics
> associated to++,-- is to interpret the unit as the duration of the
> time_point.
> Given
> Atime_point tp;
> tp++
> will be equivalent to
> tp += Atime_point::duration(1);
> Howard, do you think that there is a chance this semantics could be accepted
> for TR2?

I think there's a chance. I'm not sure enough to be able to say whether that chance is high or low. The chances would probably improve if boost's use of it did show benefit and did not show any problems.

I don't immediately see any problems with this addition.

I think it should be specified/implemented as:

Returns: time_point(d_++);

where d_ is the "// exposition only" member in the specification of time_point. This will ensure that if Rep has any unusual properties associated with operator++(int), it will be picked up via duration::operator++(int) and subsequently time_point::operator++(int).


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