Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-09-09 16:28:43


"Jonathan Turkanis" <technews_at_[hidden]> wrote in message
news:chqfj7$sh4$1_at_sea.gmane.org...
|
| "Thorsten Ottosen" <nesotto_at_[hidden]> wrote in message

| > sub_range<string> sub = ...;
| > if( sub == "foo" )
|
| Wouldn't it be natural to define a collection-oriented version of std::equal
| from <algorithm> to perform this test?

sure, but that might be frased in term of one range argument and one iterator
argument...and it wouldn't be
easy to use.

| > 3. operator<() cannot be defined for iterators in general and hence we
| > couldn't put iterator_range into a set/map;
|
| Would this be a lexicograpkical comparison?

yes, simply forward to std::lexicographical_compare

br

Thorsten


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