From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-08-22 10:50:30
"Pavol Droba" <droba_at_[hidden]> wrote in message
> Both functions should construct a range of type RangeT, that will
> contain elements from Source or [From,To) respectively.
> In the standard library Sequence concept defines a way for constructing a
> sequence from and arbitrary range of iterators. This is very useful
> concept and it would be nice to have something similar available
> in the Range library.
> Most significant advantage of this construct is that it allows to create
> algorithms, that modify an input range and return a copy of it.
right. a range is not copyable, so we need a new concept.
> Currently there is no generic way for constructing or modifying a
> range, therefor it restricts the usage of range to non-mutable input
> For instance a simple to_lower algorithm (available in StringAlgo library)
> template<typename SequenceT>
> SequenceT to_lower_copy(const SequenceT& Input, const std::locale&
> requires the input to satisfy sequence requirements so it can construct
> This effectively disables many advantages of Range library.
by this you mean that the sequence requirement is too strict?
> Because it is not possible
> to adapt an external class (like CString) to work with this algorithm.
> Yes it could be very easy to implement construction for this class.
then what about a CopyableRange concept?
> There is already a similar function in the range library. It's called
> this function is provided solely for sequences and there is no feasible
> documented way for customization.
do you want ADL customization like as with the other functions?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk