Boost logo

Boost :

Subject: Re: [boost] [chrono] New Features + Bug fixes + Updated documentation
From: Howard Hinnant (howard.hinnant_at_[hidden])
Date: 2009-12-11 11:20:04


On Dec 11, 2009, at 3:37 AM, vicente.botet wrote:

> There is yet an error with gcc-4.4.0
>
> ./boost/chrono/chrono.hpp:945: error: declaration of 'typedef class boost::chrono::duration<long long int, boost::ratio<1ll, 10000000ll> > boost::chrono::system_clock::duration'
> ./boost/chrono/chrono.hpp:458: error: changes meaning of 'duration' from 'class boost::chrono::duration<long long int, boost::ratio<1ll, 10000000ll> >'
>
> Note that the line numbers will be no more significant. It corresponds to the following
>
> namespace chrono {
>
> template <class Rep, class Period>
> class duration
> {...}
>
> class BOOST_CHRONO_DECL system_clock
> {
> public:
> typedef BOOST_SYSTEM_CLOCK_DURATION duration;
> ...
> };
> }
>
> where
>
> #ifdef BOOST_CHRONO_WINDOWS_API
> // The system_clock tick is 100 nanoseconds
> # define BOOST_SYSTEM_CLOCK_DURATION duration<boost::int_least64_t, ratio<BOOST_INTMAX_C(1), BOOST_INTMAX_C(10000000)> >
> #else
> # define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::nanoseconds
> #endif

Try qualifying "duration" with "chrono::" in BOOST_SYSTEM_CLOCK_DURATION:

# define BOOST_SYSTEM_CLOCK_DURATION chrono::duration<boost::int_least64_t, ...

-Howard


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