Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2007-02-27 04:19:42


Matias Capeletto wrote:
> Hi all,
>
> Thanks to John Maddok test of Boost.Bimap we discovered that some
> compilers (VS7.1 for example) may have a hard time recognizing between
> the "bimap" namespace and the "bimap" class if you try to compile the
> following code:
>
> using namespace boost::bimap;
> using namespace boost;
> typedef bimap<int, double> bm_type;

Oh shucks :-(

> If you switch the using statements this problem is gone in VS7.1 but
> persist in VS8
> The following code compiles in VS7.1
>
> using namespace boost;
> using namespace boost::bimap;
> typedef bimap<int, double> bm_type;
>
> You can use the container with the full namespace path in order to
> solve this problem:
>
> using namespace boost;
> using namespace boost::bimap;
> typedef ::boost::bimap::bimap<int, double> bm_type;
>
> Is this a problem that can be solved with a warning in the docs?
> Do you think it may be better to rename the "bimap" class to something
> else like "bidirectional_map"?

Personally I like the short name "bimap", so I would be happy with a big
warning in the docs.

John.


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