Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2007-02-28 04:14:55


Matias Capeletto wrote:
> What are the reasons for this change?
> (If it is changed I think we should call it bimap.above)
>
> I like the above view because the set of relations is handy (and
> better suited) for general not directed task such as insertion (it is
> more efficient in it than in the side views), iteration, questions as
> size or empty. Why not to make it easily accessible?
>
> If you want to know the size and there is not such thing as the
> relation view, what side would you choose? bimap.left.size()? What is
> special about it?
> bimap.size() is IMO a better way to express in the code your
> intention.

First off I confess that I'm not completely set on this change - just that
it's one possible solution to a recurring theme among reviewers. The
rationale is that it forces you to specify *which* view you're talking
about. Maybe an alternative would perhaps be to document bimap from the
start as a "container of relations that also offers left/right associative
views".

BTW "above" is a terrible name: call a relation a relation IMO :-)

John.


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