Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-01-03 07:29:18


Thomas Witt wrote:
> Thorsten,
>
> Thorsten Ottosen wrote:
>
>>Joshua Moore-Oliva wrote:
>>
>>>If I'm unaware of some C++ convention I would love to be informed, however
>>>this definitely screams bug to me.
>>
>>I think you're right.
>>
>>Thomas, is it ok to fix this in the 1.34 branch?

This was a non-issue for 1.34.

> Sounds like it needs fixing, can you post a patch first?

However, I discovered that erase() needed to be overloaded for a Range
argument. The patch is shown below (additionally two test files needs to
be slightly opdated.

Let me know if I can commit those changes.

-Thorsten

Index: detail/associative_ptr_container.hpp
===================================================================
RCS file:
/cvsroot/boost/boost/boost/ptr_container/detail/associative_ptr_contai
ner.hpp,v
retrieving revision 1.8
diff -u -r1.8 associative_ptr_container.hpp
--- detail/associative_ptr_container.hpp 18 Feb 2006 01:41:14
-00001.8
+++ detail/associative_ptr_container.hpp 2 Jan 2007 18:13:46 -0000
@@ -121,6 +121,12 @@
              this->c_private().erase( first.base(), last.base() );//
nothrow
              return res; //
nothrow
          }
+
+ template< class Range >
+ iterator erase( const Range& r )
+ {
+ return erase( boost::begin(r), boost::end(r) );
+ }

      protected:


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk