Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4100: some boost classes have sizeof that depends on NDEBUG
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-25 03:33:35
#4100: some boost classes have sizeof that depends on NDEBUG
----------------------------------+-----------------------------------------
Reporter: fjoe@⦠| Owner: jano_gaspar
Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: circular_buffer
Version: Boost 1.42.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------+-----------------------------------------
Comment (by anonymous):
Seems that my last comment is lost: the use-case is that there is a
library that uses boost and that I do not have control of. It's not the
problem with my build configuration. I do not want to sync my CPPFLAGS
with build-time flags for that library.
Such depends on quite common macros as NDEBUG is just not good for a
general purpose library as boost or STL.
Also, I do not see NDEBUG in gcc 4.2 STL headers (as shipped with FreeBSD
8.1) and gcc 4.5 STL headers (as shipped with Debian Squeeze). php and
wxWidgets are not general purpose libraries and I would not care about
them at all.
As for identical in-memory layout but different behavior -- I would not
care as long as ABI is not broken. This means that if you have additional
members you should implement copy constructors and = operators properly
(and other assignments to them) regardless of NDEBUG, but you can do
additional checks that use these members in !NDEBUG case. I do not see
anything wrong with it.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4100#comment:8> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC