Boost logo

Boost :

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


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.

Jamie

>
> Meanwhile I guess you should use library variant if Boost.Test.
>
> Gennadiy
>
>
> _______________________________________________
> 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