Boost logo

Boost :

From: Matias Capeletto (matias.capeletto_at_[hidden])
Date: 2007-05-23 16:08:30

In the review Jeff Garland suggested a top level <boost/bimap.hpp> header.
I have added this header to the library.

It put the bimap class in the boost namespace.
It is not an "include all" header, it only allow the basic case in
which both collection types are sets ( bimap<X,Y> ).
I think that this is the best approach because lows the barrier to use
the library without damaging compile time by including stuff that the
user will not use. If he wants other features, he will have to include
the appropriate headers.

In its minimal form, the library can be used now like:

#include <boost/bimap.hpp>

int main()
    typedef boost::bimap< std::string, int > bm_type;
    bm_type bm;
    bm.insert( bm_type::value_type("one",1) );
    assert( bm.left.find("one")->second == 1 );

Do you think this is the correct approach?


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