|
Boost : |
Subject: Re: [boost] Query regarding time complexity requirements of iterators in custom container
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2016-01-25 13:24:10
Soul Studios wrote:
>> If you don't declare it as random access, what happens? You might
>> like to consider, for example, that some std algorithms are
>> documented to require random access iterators - but typically
>> work in practice with other iterators as long as they implement the
>> required operators.
>
> Yes, we lose access to std::find in particular under GCC I think.
std::find requires only input iterators. And even if it did
need random access iterators, I don't think it would enable_if
on the iterator category. You're sounding a bit confused...
Regards, Phil.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk