Boost logo

Boost :

Subject: Re: [boost] Timer & Boost.Test incompatibility
From: Jamie Allsop (ja11sop_at_[hidden])
Date: 2012-09-19 19:40:40


On 19/09/12 18:50, Daniel Russel wrote:
>
> 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.

Indeed, and my patch addresses this in the Boost.Test context but not in
the wider context. I'll post back when I get this attached to a ticket
tomorrow.

> --Daniel
>
>
> _______________________________________________
> Unsubscribe& other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


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