
I really think we'd be better off creating a new templated class, like std::pair<> but with both types needing to be the same and iterators. We could make a constructor for such a class using your model below) and we'd get what you want AND we'd get a concrete "range" object at the same time. At Sunday 2004-05-23 21:36, you wrote:
Why don't we provide container versions of all stl algorithms:
template<typename C,typename P> inline for_each( C const& c, P pred) // or non const ref?? { // unwrap here used to allow by_ref( c ) usage for mutable predicates std::for_each( begin( unwrap( c ) ), end( unwrap( c ) ), P ); }
Gennadiy.
Victor A. Wagner Jr. http://rudbek.com The five most dangerous words in the English language: "There oughta be a law"