Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-06-17 04:54:01

>> Mea culpa.
> I don't think you have (sinned that is), or at least not here.

Really? Adding using statements to a *header* so that a whole bunch of
symbols are brought into the global scope without you knowing about it is
surely asking for trouble isn't it? Using statements in code, especially at
function scope are a whole different ball game though - those really can
simplify code a great deal.

>> My test program had a preceding header that included
>> "using namespace std;". I'd read it was bad practice, now I know
>> why. Sorry to waste your time.
> Putting "using namespace std;" before including a boost header ought to be
> legal. I would regard it as a bug if a boost library failed because of a
> preceeding "using namespace std;" ON A STANDARDS CONFORMING COMPILER. On
> the other hand, VC6 is very far from a standards conforming compiler, so
> it
> seems perfectly reasonable to require users not to do that.

Correct: this particular issue arises froma a known about vc6 bug, no other
compiler that I know of (including vc7 and later) have the same problem.

> It would be nice if there was warning somewhere in the documentation "that
> error means you have done this, and we can't cope if you have to use VC6".

Good point, although if I document every VC6 bug (just how long has that
compiler been superseded for now?), it's going to take a long long


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