Sergey Sadovnikov skrev:
Hello, Thorsten.
Monday, May 5, 2008 at 10:30:21 PM you wrote:
TO> Sergey Sadovnikov skrev:
TO> The code in trunk changed after we could patch the release branch. Could TO> you please check that code to see if it is still surprising to you? Trunk code is still surprising me. :) If boost::ptr_sequence_adapter::erase_if has to guarantee standard std::list::remove_if behavior (for ptr_list container, of course) it should be overridden in the ptr_list class. For example, in this way:
template < class T, class CloneAllocator = heap_clone_allocator, class Allocator = std::allocator
> class ptr_list /* ... */ { public: //... template< class Pred > void erase_if( Pred pred ) { this->base().remove_if(void_ptr_delete_if (pred)); } //... }; This code corresponds all my expectations. :)
I think we need to classify this as a bug for ptr_list. I'll add the above to that class. Thanks -Thorsten