BIND 10 #2536: Eliminate „using namespace“ from headers
BIND 10 Development
do-not-reply at isc.org
Wed Dec 5 12:44:46 UTC 2012
#2536: Eliminate „using namespace“ from headers
-------------------------------------+-------------------------------------
Reporter: | Owner:
vorner | Status: new
Type: | Milestone: New Tasks
defect | Keywords:
Priority: | Sensitive: 0
medium | Sub-Project: DNS
Component: | Estimated Difficulty: 0
Unclassified | Total Hours: 0
CVSS Scoring: |
Defect Severity: N/A |
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Today, I noticed several headers contain the „using namespace“ directive.
While
we agreed not to use „using namespace“ generally, it is even worse in case
of
headers, because it pushes the namespace to all files that include it.
This
should be fixed before it causes some hard-to-find problem.
We may want to keep them in the tests, but the ones in `lib/cache` are
serious, I believe:
{{{
$ find -iname '*.h' | xargs grep -n '^using'
./src/lib/nsas/tests/nsas_test.h:41:using namespace isc::dns::rdata;
./src/lib/nsas/tests/nsas_test.h:42:using namespace isc::dns;
./src/lib/nsas/tests/nsas_test.h:43:using namespace isc::util;
./src/lib/nsas/tests/nsas_test.h:44:using
isc::util::unittests::TestResolver;
./src/lib/cache/tests/cache_test_messagefromfile.h:20:using namespace isc;
./src/lib/cache/tests/cache_test_messagefromfile.h:21:using namespace
isc::dns;
./src/lib/cache/tests/cache_test_sectioncount.h:20:using namespace isc;
./src/lib/cache/tests/cache_test_sectioncount.h:21:using namespace
isc::dns;
./src/lib/cache/rrset_entry.h:25:using namespace isc::nsas;
./src/lib/cache/message_entry.h:25:using namespace isc::nsas;
./src/lib/cache/rrset_cache.h:23:using namespace isc::nsas;
./src/lib/dns/tests/rdata_unittest.h:27:using namespace isc::util;
}}}
--
Ticket URL: <http://bind10.isc.org/ticket/2536>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list