[Boost-bugs] [Boost C++ Libraries] #1692: 'iterator::m_it' declared public ONLY in test/debug-build, but always accessed from 'cicular_buffer::erase()'

Subject: [Boost-bugs] [Boost C++ Libraries] #1692: 'iterator::m_it' declared public ONLY in test/debug-build, but always accessed from 'cicular_buffer::erase()'
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-03-17 01:51:16


#1692: 'iterator::m_it' declared public ONLY in test/debug-build, but always
accessed from 'cicular_buffer::erase()'
-------------------------------------+--------------------------------------
 Reporter: Tobi.Winkler_at_[hidden] | Owner: jano_gaspar
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: circular_buffer
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 In the current version of boost::circular_buffer, there is a small bug
 where ''iterator::m_it'' is declared ''private'' if not in test-mode
 (explains why this didn't get caught) but accessed from
 ''circular_buffer::erase(iterator, iterator)'' even in non-debug/non-test
 mode. This just causes a compiler error.

 (I think just adding
         template <class T, class Alloc>
         friend class circular_buffer;
  should be enough.
 )


 ----

 {{{
 /boost/boost/circular_buffer/details.hpp (r1.4)
            class iterator
 222 #if !defined(BOOST_CB_TEST) && !BOOST_CB_ENABLE_DEBUG
 223 private:
 224 #endif
 225 // Member variables
 226
 227 //! The circular buffer where the iterator points to.
 228 const Buff* m_buff;
 229
 230 //! An internal iterator.
 231 pointer m_it;
 }}}

 ---

 {{{
 /boost/boost/circular_buffer/base.hpp (r1.8)
            circular_buffer::erase(iterator, iterator)
 1717 pointer next = pos.m_it;
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1692>
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:57 UTC