Boost logo

Boost :

Subject: Re: [boost] [btree] Library working with more compilers and standard libraries
From: Beman Dawes (bdawes_at_[hidden])
Date: 2010-09-29 21:26:30


On Tue, Sep 28, 2010 at 9:55 PM, Stephan T. Lavavej
<stl_at_[hidden]> wrote:
> [Beman Dawes]
>> VC++ 9 is working OK in release mode. There is a bug in some debug
>> mode code in the standard library <algorithm> header's lower_bound and
>> upper_bound functions.
>
>...
>
> I should clarify my original conclusion ("By the way, providing additional comparators is the correct workaround for VC8/9."). I'll refer to the sequence's element type as E and the provided value's type as V. If you provide E < E, E < V, and V < E (or equivalent comparators), and the sequence is sorted with respect to E < E and partitioned with respect to E < V and V < E, then you should be fine. Providing such comparators should almost always be possible, since lower_bound() and upper_bound() are almost always used with sequences that are actually sorted according to some criterion, rather than merely partitioned.

Worked like a charm!

VC++ 8, 9, and 10 are now passing all the B-tree tests.

Thanks!

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk