Utility Rack
|
Convenience functions for the erase-remove idiom in C++. More...
#include <algorithm>
#include <utility>
Go to the source code of this file.
Functions | |
template<typename C > | |
auto | chops::erase_where (C &c, const typename C::value_type &val) |
template<typename C , typename F > | |
auto | chops::erase_where_if (C &c, F &&f) |
Convenience functions for the erase-remove idiom in C++.
It's a common error to forget to erase an element from a container after calling remove
. This wraps the two calls together.
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)