|
Boost Users : |
Subject: [Boost-users] NDEBUG causes a compilation error in Boost.Interprocess
From: Sergey Kurenkov (skwllsp_at_[hidden])
Date: 2010-08-27 07:58:42
I use Boost 1.42 and gcc 4.3.1 on HP-UX 11.31.
So today I defined NDEBUG and BOOST_DISABLE_ASSERTS in my makefile,
ran make and got this error:
../../../src/libs/src/external/boost/1.42.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp:
In function 'void
boost::interprocess::detail::semaphore_close(sem_t*)':
../../../src/libs/src/external/boost/1.42.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp:102:
error: 'assert' was not declared in this scope
../../../src/libs/src/external/boost/1.42.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp:
In function 'void
boost::interprocess::detail::semaphore_destroy(sem_t*)':
../../../src/libs/src/external/boost/1.42.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp:137:
error: 'assert' was not declared in this scope
If I do not set NDEBUG and BOOST_DISABLE_ASSERTS everything is OK.
Seems like the problem is that in semaphore_wrapper.hpp there is a
call to assert() and if NDEBUG is set then correct headers are not
included.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net