26 Jan
2016
26 Jan
'16
6:21 p.m.
Soul Studios wrote:
std::vector can't have a + operator that isn't O(1).
I was describing a filtering iterator adaptor over a std::vector::iterator. Advancing such an iterator needs to evaluate its filter predicate for each element, so its operator+ (if it has one) will be O(N). Good luck with your project. Regards, Phil.