Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2005-05-31 05:32:39


Jonathan Wakely ha escrito:

> On Tue, May 31, 2005 at 08:36:41AM +0200, Joaqu?n M? L?pez Mu?oz wrote:
>
> > Martin Wille posted about this a couple of days ago
> > (http://lists.boost.org/boost-testing/2005/05/1216.php), but I'm afraid
> > it could have passed unnoticed.
> >
> > Some tests from Boost.(Assign|Range|PointerContainer) have
> > the following layout
> >
> > #include<...>
> >
> > using namespace std;
> > using namespace boost;
> >
> > ...
> >
> > #include <boost/test/unit_test.hpp>
> >
> >
> > having the using directives before boost/test/unit_test.hpp is AFAICS
> > illegal
> > and does indeed cause problems with GCC 3.4.x and GCC 4.x, see
> > for instance http://tinyurl.com/8payc
>
> That's a libstdc+ bug which has been fixed in GCC's CVS.
> (The problem is revealed because of the using directives before the
> header, which are legal, but can be dangerous)

Yes, giving it a second thought it is probably legal...
Anyway, could you confirm whether moving the includes up
fixes the problem?

Thank you,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

>
>
> > I cannot test it, but I guess it suffices to move all the includes
> > before
> > any using directive. This will probably clear up dozens of tests,
> > including
> > some toolsets that are currently marked as unusable.
>
> jon
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


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