| Home | Libraries | People | FAQ | More

## Function template erase_if

boost::container::erase_if

## Synopsis

    // In header: <boost/container/hub.hpp>

    template<typename T, typename Allocator, typename Predicate>
      hub< T, Allocator >::size_type
      erase_if(hub< T, Allocator > & x, Predicate pred);

## Description

Effects: Erases all elements of x for which pred returns true.

Returns: The number of erased elements.

Complexity: Linear in x.size().

Note: Potentially faster than the naive erase loop due to internal optimizations.