Boost logo

Boost :

Subject: [boost] Timer & Boost.Test incompatibility
From: Craig Henderson (cdm.henderson_at_[hidden])
Date: 2012-09-19 05:25:05

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

  Boost 1.51.0
  MSVC 2012
  Windows 7

Is this a known conflict? Is there any workaround?

-- Craig

Boost list run by bdawes at, gregod at, cpdaniel at, john at