From: Eric Niebler (eric_at_[hidden])
Date: 2005-03-24 14:55:19
David Abrahams wrote:
> "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
>>"Eric Niebler" <eric_at_[hidden]> wrote in message
>>| Thorsten Ottosen wrote:
>>| says, it suggests an association with the iterator_range<> type. But
>>| also, in my understanding, the Range concept is a bit more inclusive
>>| than merely "iterator ranges". A std container satisfies the Range
>>| concept, doesn't it?
> In what sense is a standard container not an iterator range?
You snipped the part of my message where I explain that:
Consider iterator_range_size(). I could have a container that satisfies
the range concept for which .size() is an O(1) operation, but
std::distance( .begin(), .end() ) is O(N). What Big-O is suggested by
"iterator_range_size()" when applied to one of those contaiers?
My point was, there are range operations that are not necessarily
implemented in terms of lower-level operations on iterators, so the name
"iterator_range_size()" might be misleading.
-- 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