Boost logo

Boost Users :

Subject: Re: [Boost-users] intrusive bug: equal_range implementation vs bounded_range precondition
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-12-12 18:12:41

> The precondition is wrong. It should read "('left_closed' AND
> 'right_closed') must be false.

Sorry. That's also incorrect: left_closed || right_closed == true.

That is:

first = upper_bound(lower_key);
second = lower_bound(upper_key);

leads to an invalid range, since "first" could be bigger than "second"
if lower_key == upper_key.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at