Bernie Bright writes: > David Megginson wrote: > > Bernie Bright writes: > > > Perhaps a top level SimGear namespace with second level > > > namespaces corresponding to the major functional divisions, as > > > you've outlined. I think we should eliminate the Misc group as > > > well. > > > > I agree strongly on namespaces -- they'll eliminate some of our MSVC > > conflicts as well, especially if people avoid using global #defines > > whenever possible. Do all of our target compilers now support them?
YASim puts all of its code into the yasim namespace, and I believe I've gotten success reports from pretty much everybody. And I agree, namespaces are a Good Thing. They're very simple to use, easy to interpret, and have essentially zero drawbacks. I wish the same could be said for the rest of the language... OK, I kinda wish the syntax was more like the Java or perl packages. Having to bracket the whole file in a namespace { ... }; declaration is a little silly. Emacs wants to give me an extra level of indentation for that, and it's annoying. > I believe so, although some just ignore namespace declarations > (gcc-2.95!). My only guideline is Boost, it targets many the same > platforms we do (and some we don't). The gcc-2.95 I'm using (the one named something different, packaged by a distribution vendor I'm afraid to name) supports namespaces just fine. They aren't ignored. The following, for example, compiles and produces the expected results, despite the fact that foo() is declared in both namespaces: #include <iostream> namespace a { void foo() { cout << "a\n"; } }; namespace b { void foo() { cout << "b\n"; } }; int main() { a::foo(); b::foo(); } Andy _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel