Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2005-03-14 10:49:42


Thorsten Ottosen wrote:

>
> there is one alternative which might make copy_range less needed too.
> We could put this into sub_range<T>:
>
> operator T() const
> { return T( begin(), end() ); }
>
> So if you really want range2container conversion, you must use a
> sub_range<string>:
>
> str = sub_range<std::string>( find_first(intput, "jello" ) );
>

Eeek, no! Implicit conversions should be avoided. But thinking of this
as a range conversion is the right way to go, IMO, except that it should
be called "range_cast" and it should be explicit.

> Anyway, I agree with Eric that the transform_range should go away.
>
> Eric, feel free to remove it or say if I should do it.
>

I'll do it. Thanks!

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

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