[Boost-bugs] [Boost C++ Libraries] #2898: iterator_range field removal when NDEBUG defined

Subject: [Boost-bugs] [Boost C++ Libraries] #2898: iterator_range field removal when NDEBUG defined
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-03-30 17:52:12


#2898: iterator_range field removal when NDEBUG defined
--------------------------------+-------------------------------------------
 Reporter: ethan.howe_at_[hidden] | Owner: nesotto
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: range
  Version: Boost 1.36.0 | Severity: Problem
 Keywords: |
--------------------------------+-------------------------------------------
 The iterator_range header defines the singular field as follows (in
 1.36.0):

 {{{
 #ifndef NDEBUG
 bool singular;
 #endif
 }}}

 This is not recommended C++ style because a difference in a compiler flag
 between libraries and executables both including this header can cause
 hard to diagnose runtime faults. I was using a library that was created
 without NDEBUG and when I compiled my executable with NDEBUG, I saw an
 illegal instruction abort meaning that my program execution had been
 corrupted.

 I would like to request that this (and any other) object field, and so the
 object size, be made independent of compiler flags by removing the #ifndef
 above.

 Thanks,[[BR]]
 Ethan

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2898>
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:49:59 UTC