Hi Frank,
Hi Andreas,
why not preventing "using namespace" in general
As a general rule? No, I wouldn't like to impose this on everybody, this
is an unnecessary restriction, IMO.
As a personal habit? Well, why not.
It was not realy thought as "general rule" .-)
And yes ... it's my preferred solution so you are right with "personal
habit".
From my point of view there can be one "general rule" only:
prevent using of "incomplete" namespace declarations.
Means:
- do not use "using namespace ::rtl"
- use intsead "using namespace ::rtl::OUString"
- or use namespaces explicit in your code as e.g.
"::rtl::OUString sTest;"
and using namespace alias instead ...
...
Personally, my preferred solution is a sequence of
using ::com::sun::star::foo::XBar;
statements. With the proper IDE (i.e. *not* the Visual C++ /Express
Edition/), it's a matter of a single keystroke to insert such a
declaration automatically ...
Why not go the next step and make the same then NetBeans it does ...
There you have an item within the context menu named "Fix Imports ..."
which does what it means. It actualize your list of imports; add new
missing ones and remove(!) obsolete ones. But tell me an usable C++ IDE
providing the same ... which works within our environment with thousands
of unknown possible header files .-)
Ciao
Frank
Ciao
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]