Re: [Boost-bugs] [Boost C++ Libraries] #4100: some boost classes have sizeof that depends on NDEBUG

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-24 06:01:53


#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 marshall):

 ''NDEBUG is quite common macro. It should never affect sizeof.''

 That's quite a assertion. Could you back that up, please?

 ''Just do not use NDEBUG in headers.''

 Checking on my system, I find that the C++ standard library shipped with
 gcc 4.2 uses NDEBUG in headers, as does php and wx-windows.

 ''The problem is rather serious if two binaries that are loaded into the
 same address space (e.g. a library and a program, or two libraries) are
 built with different defines (one with NDEBUG, the other without it).''

 This is absolutely true - in that case, you would have an
 [http://lmgtfy.com/?q=one+definition+rule+c%2B%2B ODR violation]. However,
 I don't think that this is a problem with the boost library, but rather
 with your build configuration.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4100#comment:6>
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