Boost logo

Boost Users :

From: Thore Karlsen (sid_at_[hidden])
Date: 2005-12-13 12:01:25


split() is declared as follows:

template<typename SequenceSequenceT, typename RangeT, typename
PredicateT> SequenceSequenceT &
  split(SequenceSequenceT & Result, RangeT & Input, PredicateT Pred,
        token_compress_mode_type eCompress = token_compress_off);

Is there a reason why Input isn't const? It would be nice to be able to
construct an iterator range in the call to split(), like this:

 typedef iterator_range<string::const_iterator> range;
 vector<range> inputs;
 split(inputs, range(Begin, End), is_any_of("\r\n"), token_compress_on);

It's the same for find_all(), ifind_all(), and probably others, so there
might be a good reason for it that I'm missing.

-- 
Be seeing you.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net