Commit 438f31e7 authored by Jeremy C. Reed's avatar Jeremy C. Reed
Browse files

[master] fix errors with ambiguous types and other boost uses

Stop doing "using namespace boost" and be specific with the using boost::.

Problem noticed on Solaris 11 with g++ 4.5.2 and boost 1.50.0.
Tested with older g++ 4.1.3 with boost 1.42.0 (on NetBSD).

Discussed little on jabber.
parent 40f18774
......@@ -31,7 +31,7 @@
#include <boost/shared_ptr.hpp>
using namespace boost;
using boost::lexical_cast;
using namespace isc::util;
using namespace isc::util::encode;
using namespace isc::cryptolink;
......
......@@ -24,7 +24,9 @@
using namespace isc::data;
using namespace isc::dns;
using namespace std;
using namespace boost;
using boost::lexical_cast;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
namespace isc {
namespace datasrc {
......
......@@ -38,7 +38,8 @@
using namespace isc::dns;
using namespace std;
using namespace isc::dns::rdata;
using namespace boost;
using boost::lexical_cast;
using boost::scoped_ptr;
namespace isc {
namespace datasrc {
......
......@@ -34,7 +34,7 @@
#include <dns/rrtype.h>
using namespace std;
using namespace boost;
using boost::lexical_cast;
using namespace isc::dns::rdata;
using namespace isc::util;
......
......@@ -44,7 +44,7 @@
#include <dns/tsig.h>
using namespace std;
using namespace boost;
using boost::lexical_cast;
using namespace isc::dns::rdata;
using namespace isc::util;
......
......@@ -35,7 +35,7 @@
#include <dns/rrtype.h>
using namespace std;
using namespace boost;
using boost::lexical_cast;
using namespace isc::util;
namespace isc {
......
......@@ -29,7 +29,7 @@
#include <dns/tsigerror.h>
using namespace std;
using namespace boost;
using boost::lexical_cast;
using namespace isc::util;
using namespace isc::util::encode;
using namespace isc::util::str;
......
......@@ -28,7 +28,7 @@
#include <util/strutil.h>
using namespace std;
using namespace boost;
using boost::lexical_cast;
using namespace isc::util;
using namespace isc::dns;
using namespace isc::dns::characterstr;
......
......@@ -27,7 +27,7 @@
#include <dns/rdataclass.h>
using namespace std;
using namespace boost;
using boost::lexical_cast;
using namespace isc::util;
// BEGIN_ISC_NAMESPACE
......
......@@ -27,7 +27,7 @@
#include <dns/rdataclass.h>
using namespace std;
using namespace boost;
using boost::lexical_cast;
using namespace isc::util;
using namespace isc::dns;
using namespace isc::dns::characterstr;
......
......@@ -162,7 +162,7 @@ NSEC3::toText() const {
ostringstream s;
bitmapsToText(impl_->typebits_, s);
using namespace boost;
using boost::lexical_cast;
return (lexical_cast<string>(static_cast<int>(impl_->hashalg_)) +
" " + lexical_cast<string>(static_cast<int>(impl_->flags_)) +
" " + lexical_cast<string>(static_cast<int>(impl_->iterations_)) +
......
......@@ -95,7 +95,7 @@ NSEC3PARAM::~NSEC3PARAM() {
string
NSEC3PARAM::toText() const {
using namespace boost;
using boost::lexical_cast;
return (lexical_cast<string>(static_cast<int>(impl_->hashalg_)) +
" " + lexical_cast<string>(static_cast<int>(impl_->flags_)) +
" " + lexical_cast<string>(static_cast<int>(impl_->iterations_)) +
......
......@@ -27,7 +27,7 @@
#include <dns/rdataclass.h>
using namespace std;
using namespace boost;
using boost::lexical_cast;
using namespace isc::util;
// BEGIN_ISC_NAMESPACE
......
......@@ -28,7 +28,7 @@
#include <dns/rdataclass.h>
using namespace std;
using namespace boost;
using boost::lexical_cast;
using namespace isc::util;
using namespace isc::util::encode;
......
......@@ -157,7 +157,7 @@ SRV::~SRV() {
/// \return A \c string object that represents the \c SRV object.
string
SRV::toText() const {
using namespace boost;
using boost::lexical_cast;
return (lexical_cast<string>(impl_->priority_) +
" " + lexical_cast<string>(impl_->weight_) +
" " + lexical_cast<string>(impl_->port_) +
......
......@@ -31,7 +31,8 @@
#include <gtest/gtest.h>
using namespace boost;
using boost::lexical_cast;
using boost::scoped_ptr;
using namespace isc::acl;
using namespace isc::asiolink;
using namespace isc::server_common;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment