Boost logo

Boost Users :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2005-08-23 16:42:15


----- Mensaje original -----
De: Thorsten Ottosen <nesotto_at_[hidden]>
Fecha: Martes, Agosto 23, 2005 11:22 pm
Asunto: Re: [Boost-users] [1.33][ptr_container] bug in erase()
inassociativecontainers?
[...]
> >
> > size_type erase( const key_type& x ) // nothrow
> > {
> > BOOST_ASSERT( !this->empty() );
> > iterator i = find( x ); // nothrow
> > if( i == this->end() ) // nothrow
> > return 0; // nothrow
> > this->remove( i ); // nothrow
> > return this->c_private().erase( i.base() ); // nothrow
> > }

Why the BOOST_ASSERT? Do you require that the container
be non-empty for erase to be callable? Am I missing something?

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net