「view this page in B3 βῆτα server」

Revisions №59009

branch: master 「№59009」
Commited by: Rocco Moretti
GitHub commit link: 「ae611f909b26d5c5」 「№1707」
Difference from previous tested commit:  code diff
Commit date: 2016-10-12 12:28:58

Merge pull request #1707 from RosettaCommons/roccomoretti/no_using Dis-ab-using Rosetta headers Our coding conventions state that we shouldn't use `using namespace` in the top level of header files. There's a good reason for this: `using namespace` in a header file doesn't just affect that header file, it also affects all subsequent header files and cc files. (Even if the two headers don't directly include each other, but are instead mutually included in a third file, the using declaration from one can change how the other header is parsed.) I'd even go one further: a non-namespace `using` directive in headers is also a bad idea, unless you're explicitly attempting to hoist a symbol from one namespace to the other. (So no using declarations just because you don't want to type "core::" in front of everything.) This pull request removes all `using namespace` from the headers in src, as well as all the convenience `usings` (usings which looked to me to be namespace hoistings were left.) A new integration tests was added, which should fail upon the introduction of a `using namespace` or `using` in the top level of headers. (There's an ignore mechanism for the hoisting usings.) `using`s and `using namepace`s are still permitted in *.cc file, as well as within classes and functions within header files (as the effect is scope limited). I also did not touch the apps/pilot/ or devel/ directories, and the integration test ignores those.

...