
----- Mensaje original ----- De: Thorsten Ottosen <nesotto@cs.aau.dk> 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