|
Boost : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-07-26 10:34:14
Ahh yes, this has to do with the two design options Dave mentioned in a
recent email. I forgot that the current version of half_open_range uses
counting_iterator as the iterator type, so half_open_range is different
from your range class. We probably need both classes.
On Thu, 26 Jul 2001 helmut.zeisel_at_[hidden] wrote:
> This, however, doesn't :-(
>
> int w[]={3,2,4,1};
> static const int n = sizeof(w)/sizeof(int);
> sort(make_range(w,w+n));
> copy(make_range(w,w+n),std::ostream_iterator<int>(std::cout," "));
> std::cout << "\n";
> sort(make_range(v.rbegin(),v.rend()));
> copy(v,std::ostream_iterator<int>(std::cout," "));
>
> Just from a pragmatic point of view:
> shouldn't make_range also work with built-in pointers?
> Then also the existing STL algorithms can be
> uniquely extended to an interface
> that accepts a container or a make_range-result.
----------------------------------------------------------------------
Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
Summer Manager, AT&T Research phone: (973) 360-8185
----------------------------------------------------------------------
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk