$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Pavol Droba (droba_at_[hidden])
Date: 2005-08-22 12:53:15
On Mon, Aug 22, 2005 at 05:50:30PM +0200, Thorsten Ottosen wrote:
>
> "Pavol Droba" <droba_at_[hidden]> wrote in message
> news:20050822095022.GC8823_at_lenin.felcer.sk...
>
[snip]
> > 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.
precisely.
>
> > Currently there is no generic way for constructing or modifying a
> > range, therefor it restricts the usage of range to non-mutable input
> > parameters.
> >
> > For instance a simple to_lower algorithm (available in StringAlgo library)
> >
> > template<typename SequenceT>
> > SequenceT to_lower_copy(const SequenceT& Input, const std::locale&
> > Loc=std::locale());
> >
> > requires the input to satisfy sequence requirements so it can construct
> > the result.
> > This effectively disables many advantages of Range library.
> >
> by this you mean that the sequence requirement is too strict?
>
Sequence requires also a bunch of other members. Also it is purely defined
in the terms of member functions.
So at least we need an external alternative.
> > 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?
>
Sounds fine.
> > There is already a similar function in the range library. It's called
> > copy<> but,
> > this function is provided solely for sequences and there is no feasible
> > and
> > documented way for customization.
> >
> do you want ADL customization like as with the other functions?
>
I'd like to see a documented way for customization. Unless there is a good
reason for it, it should like like the functions that are already there
like begine and end.
Regards,
Pavol