stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Pevtsov <ant...@moscow.vdiweb.com>
Subject test for lib.equal.range
Date Thu, 02 Feb 2006 16:06:23 GMT
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


Mime
View raw message