Boost logo

Boost :

Subject: Re: [boost] [chrono] time_point.hpp depends on Boost.System; should it?
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2012-06-28 06:07:52


2012/6/27 Vicente J. Botet Escriba <vicente.botet_at_[hidden]>

> Le 27/06/12 14:15, Krzysztof Czainski a écrit :
>
> Hello,
>>
>> I want to create my own clock class, and in it among other things I would
>> like to typedef a time_point<...>.
>>
>> struct MyClock
>> {
>> typedef int64_t rep;
>> typedef boost::milli period;
>> typedef boost::chrono::duration<rep,**period> duration;
>> typedef date_chrono::time_point<**SystemClock,duration> time_point;
>>
> I gues you mean chrono:: and not date::chrono::

Yes, that's a copy-paste leftover.

>
> static bool const is_monotonic = false;
>>
> is_monotonic is not used any more. You should use is_steady.

Ok, thanks for the info. I based this design on boost-1.48 docs.
[...]

> From the documentation
> "
>
>
> Don't provide Hybrid Error Handling
>
> When |BOOST_CHRONO_DONT_PROVIDE_**HYBRID_ERROR_HANDLING| is defined the
> lib don't provides the hybrid error handling prototypes:
>
> Clock::time_point Clock::now(system::error_code&**ec=boost::thows());
>
> This allow to be closer to the standard and to avoid the Boost.System
> dependency, making possible to have Boost.Chrono as a header-only library."
>
> Unfortunately, when this macro is defined the include to
> <boost/system/error_code.hpp> is yet done. I will fix it.

Thanks.
[...]

> Please, could you create a Trac ticket?
>
Ok, I will do that.

Cheers,
Kris

>
>


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