Boost logo

Boost :

From: Michael Marcin (mmarcin_at_[hidden])
Date: 2007-02-26 16:59:26


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;
>
> 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"?
>

According to:

http://www.boost.org/more/lib_guide.htm#Guidelines

"The library's primary namespace (in parent ::boost) is given that same
name, except when there's a component with that name (e.g., boost::tuple),
in which case the namespace name is pluralized. For example,
::boost::filesystem."

i.e. bimap should be in namespace boost::bimaps

- Michael Marcin


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