Boost logo

Boost :

From: Martin (adrianm_at_[hidden])
Date: 2005-05-09 04:03:04


>But I think, that predicate classes should be placed elsewhere, maybe closer
to map/set implementation.

What about predicate classes for equals, starts_with etc so you can use them
with standard algorithms without specifying all template arguments.

Something like:

struct istarts_with_pred {
  template<typename T1, typename T2>
  bool operator()(const T1& arg1, const T2& arg2) const {
    return boost::istarts_with(arg1, arg2);
  }
};

std::find_if(vectorofstrings.begin(), vectorofstrings.end(), bind<bool>
(istarts_with_pred(), _1, "prefix"))

Also, will 1.32 be the last version where string_algo works with VC70?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk