Boost logo

Boost Users :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-10-11 12:58:23


John Femiani skrev:
>> John Femiani skrev:
>>> using namespace boost::fusion;
>>> using namespace boost;
>> Please don't do this. If you really think it is too much to write
>> boost::, use
>>
>> namespace b = boost;
>> namespace bf = boost::fusion;
>>
>> -Thorsten
>
> Too much? I'm not lazy, just confused.
> I thought fusion would allow me to treat both types of container
> uniformly, and if I have to use different names that just isn't true.
> Perhaps I misunderstood Fusion.

This has, in general, nothing to do with Fusion or Range. The problem
is, with your two statements,

>>> using namespace boost::fusion;
>>> using namespace boost;

pulls in a potentially huge number of functions and classes. Many of
these functions are unconstrained templates, eg. boost::begin() is.
So which begin() function are you referring to? The correct way to use
boost.range is to call boost::begin().

-Thorsten


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net