Boost logo

Boost :

Subject: Re: [boost] [btree] Status report
From: Beman Dawes (bdawes_at_[hidden])
Date: 2011-05-19 14:25:31

On Thu, May 19, 2011 at 5:49 AM, Thorsten Ottosen
<thorsten.ottosen_at_[hidden]> wrote:
> Den 18-05-2011 20:54, Beman Dawes skrev:
>> The slides for my BoostCon "Proposed Boost B-tree Library"
>> presentation are available:
> A comment more. In
> for (map_type::iterator it = bt_map.begin();
> it != bt_map.end(); ++it)
> {
> cout << " " << it->key() << " --> "
> << it->mapped_value() << '\n';
> }
> I got lot of negative feedback when I was not interface compatible with
> existing containers in Boost.PtrContainer. Thus, we made the syntax
> i->first and i->second availble without using std::pair so at least generic
> algorithms would work.

Interesting! This is the interface design choice I'm most worried
about, and I'm willing to make even painful changes to the current
approach if convinced a different approach is better.

The feedback I got from the BoostCon audience was that they really
like the explicit names, although several people thought that
"mapped_value" should be renamed to "value".

Iterators current contain two pointers. I've worried about any
approach that would increase the size.

But I had not cosidered the impact on algorithms that expect the
"first" and "second" names, that further complicates the decision.

> Boost.Bimap does something similar. Would it not be possible to do something
> similar, even though the value is fetched lazily?

I'll look at Bimap. Thanks for the pointer.


Boost list run by bdawes at, gregod at, cpdaniel at, john at