From: John P. <pet...@ta...> - 2010-06-21 22:16:02
|
On Mon, Jun 21, 2010 at 5:11 PM, Derek Gaston <fri...@gm...> wrote: > On Jun 21, 2010, at 4:10 PM, Roy Stogner wrote: > >> >> On Mon, 21 Jun 2010, John Peterson wrote: >> >>>> "using namespace libMesh;" in libmesh_common.h, wrapped in >>>> something like >>>> #ifndef LIBMESH_USE_NAMESPACE >>>> which gets defined by something like >>>> ./configure --disable-separate-namespace >>> >>> Would it really be that simple? That doesn't put things like our Mesh >>> into a libMesh namespace. >> >> Oh, not on your life. We'd have to do that by hand, in every header >> file (and many source files), changing tens of thousands of lines of >> code. > > Yikes! I'm seriously doubting the usefulness of this decision... Yeah, but there's no two ways about it if we want to start being "good" computer library citizens, which I think is a laudable goal. The explicitly-namespaced code will be pretty ugly and verbose though. What I'd really like is some kind of GCC plugin that, on an undefined type error, you could have it modify the source and try Foo::Type instead, and if that worked, to carry on. -- John |