Re: [boost] Header error using boost.regex 1.32 built using vc6

----Original Message---- From: Martyn Woerner [mailto:martyn.woerner@tesco.net] Sent: 17 June 2005 08:31 To: boost@lists.boost.org Subject: Re: [boost] Header error using boost.regex 1.32 built using vc6
Mea culpa. I don't think you have (sinned that is), or at least not here.
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. 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". -- Martin Bonner Martin.Bonner@Pitechnology.com Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 441434

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 time.......... John.
participants (2)
-
John Maddock
-
Martin Bonner