|
Boost : |
Subject: Re: [boost] Timer & Boost.Test incompatibility
From: Daniel Russel (drussel_at_[hidden])
Date: 2012-09-19 13:50:18
On Sep 19, 2012, at 10:23 AM, Jamie Allsop <ja11sop_at_[hidden]> wrote:
> On 19/09/12 17:35, Gennadiy Rozenal wrote:
>> Craig Henderson<cdm.henderson<at> gmail.com> writes:
>>
>>>
>>> Hi, I am starting a new project. I am using boost::timer::cpu_timer from
>>> boost/timer/timer.hpp and Boost.Test
>>>
>>> When I include boost/test/included/unit_test.hpp in my unit test suite, I
>>> get compilation errors where boost::timer is declared as a class where
>>> previously it's defined as a namespace:
>>>
>>> boost/timer.hpp(45): error C2869:
>>> 'boost::timer' : has already been defined to be a namespace
>>>
>>> boost/test/impl/framework.ipp(153): error C2882:
>>> 'timer' : illegal use of namespace identifier in expression
>>>
>>> boost/test/impl/framework.ipp(153): fatal error C1903:
>>> unable to recover from previous error(s); stopping compilation
>>
>> So this is more of a conflict between
>>
>> #include<boost/timer.hpp>
>> and
>> #include<boost/timer/timer.hpp>
>>
>> Is this intentional? Who support this header?
>
> This is because Beman updated timer in the 1.48 boost release. There was no mention in the release notes as far as I recall. I have a patch for updating Boost.Test to use the new timers, since the old one is deprecated. I'll create a ticket on trac and attach the patch later today or tomorrow for your perusal.
On a related note, progress.hpp is still includes boost/timer.hpp, so it is not currently (at least as of 1.50) possible to use the new timers and the progress display in the same compilation unit.
--Daniel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk