Boost logo

Boost :

From: Pavol Droba (droba_at_[hidden])
Date: 2006-06-06 02:56:16

On Mon, Jun 05, 2006 at 11:17:24PM +0100, Valentin Samko wrote:
> According to the documentation
> one can not pass a range to boost::algorithm::trim_copy, and
> the sequence requirements must be met for the first parameter.
> Considering how trim_copy_if is implemented, one can use it with
> ranges (for example, with boost::iterator_range). Is there any reason
> the documentation requires one to pass a sequence?

There is one operations, that requires sequence - Construction.
You cannot construct and fill and arbitrary range.

Yet you probably could use iterator_range with this algorithm.

The algorithm does not require full seuqence reuirement, however
there is no other standard concept at hand, that includes all the
needed stuff.

> Is there any safe and documented way to trim a range, i.e. having two
> iterators (begin, end) get a trimmed subrange?

I was considering this possibility, but it is not there yet. You can
use boost::detail::trim_begin and boost::detail::trim_end. But these are
not documented, nor officialy supported.


Boost list run by bdawes at, gregod at, cpdaniel at, john at