Re: [Boost-users] [1.33][ptr_container] bug in erase() inassociativecontainers?

----- 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

"JOAQUIN LOPEZ MU?Z" <joaquin@tid.es> wrote in message news:1553a314f2df.14f2df1553a3@tid.es...
size_type erase( const key_type& x ) // nothrow { BOOST_ASSERT( !this->empty() );
Why the BOOST_ASSERT? Do you require that the container be non-empty for erase to be callable? Am I missing something?
Hm...I couldn't find anything on this in the standard. Can you locate the description for map<K,V>::erase( const K&) ? Thanks -Thorsten
participants (2)
-
JOAQUIN LOPEZ MU?Z
-
Thorsten Ottosen