25 Jan
2016
25 Jan
'16
6:24 p.m.
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.