|
Boost : |
Subject: Re: [boost] [chrono] New Features + Bug fixes + Updateddocumentation
From: Howard Hinnant (howard.hinnant_at_[hidden])
Date: 2009-12-11 12:21:43
On Dec 11, 2009, at 12:04 PM, vicente.botet wrote:
> Hi,
> ----- Original Message -----
> From: "Howard Hinnant" <howard.hinnant_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Friday, December 11, 2009 5:20 PM
> Subject: Re: [boost] [chrono] New Features + Bug fixes + Updateddocumentation
>
>
>>
>> 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, ...
>
> This could help if the warning was for windows API, but unfortunately it was reported be gcc-4.4.0 and also by gcc-4.3.4 :(
Try a preprocess (-E) and make sure system_clock looks the way you think it should. This could be a configuration error. I just copy/pasted your sandbox chrono.hpp into a test file and compiled it fine using gcc-4.4.0.
-Howard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk