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:45:37


On Mar 16, 2011, at 12:36 PM, Joachim Faulhaber wrote:

>> 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).
>>
>
> I don't understand this. But the aspect that is important for me from
> the ICL point of view is efficiency here. For discrete domain types
> operators ++ and -- are called frequently in ICL functions. So they
> should be fast. IIUC the operation finally is an in/decrement on the
> rep_ member which *is* fast particularly if Rep is a built in numeric
> type.

I concur with your analysis.

-Howard


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk