You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Anton Pevtsov <an...@moscow.vdiweb.com> on 2006/02/02 17:06:23 UTC

test for lib.equal.range

The attached file contains the test for the lib.equal.range algorithm.

I have one small question about the complexity of this algorithm:
The standard talks that it should be at most 2 * log (last - first) + 1.

But for some small sequences I got 2 * log (last - first) + 2 (this is
the sum of lower.bound and upper.bound "complexities").

I am not sure that this may be considered as a bug, so the test consider
2 * log (last - first) + 2 as a correct value.

I'll check this on other stl implementations (at first glance there will
be the same result).


With best wishes,
Anton Pevtsov