Example #1
0
typename TContainer::iterator erase_if_impl(TContainer& cont, TPred pred, associative_tag)
{
  auto ret = cont.end();
  for (auto it = begin(cont); it != end(cont); /* */) {
    if (pred(*it)) {
      ret = cont.erase(it++);
    } else {
      ++it;
    }
  }
  return ret;
}
Example #2
0
typename TContainer::iterator erase_impl(TContainer& cont, const TValue& val, associative_tag)
{
  return cont.erase(val);
}
Example #3
0
typename TContainer::iterator erase_if_impl(TContainer& cont, TPred pred, vectorlike_tag)
{
  return cont.erase(std::remove_if(begin(cont), end(cont), pred), end(cont));
}
Example #4
0
typename TContainer::iterator erase_impl(TContainer& cont, const TValue& val, vectorlike_tag)
{
  return cont.erase(std::remove(begin(cont), end(cont), val), end(cont));
}