From 5b916eb7c512fb76187e230aa5127a834e5663fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Thu, 22 Apr 2010 15:56:20 +0000 Subject: [PATCH] don't pollute the global namespace, move bind and shared_ptr into the lyx scope. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34264 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/bind.h | 20 ++++++++++++++------ src/support/shared_ptr.h | 12 ++++++++++-- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/support/bind.h b/src/support/bind.h index f00d1629b4..6d3d83e9ad 100644 --- a/src/support/bind.h +++ b/src/support/bind.h @@ -15,16 +15,24 @@ #if defined(_MSC_VER) && (_MSC_VER >= 1600) #include -using std::tr1::bind; -using std::tr1::placeholders::_1; -using std::tr1::placeholders::_2; -using std::tr1::ref; + +namespace lyx +{ + using std::tr1::bind; + using std::tr1::placeholders::_1; + using std::tr1::placeholders::_2; + using std::tr1::ref; +} #else #include "boost/bind.hpp" -using boost::bind; -using boost::ref; + +namespace lyx +{ + using boost::bind; + using boost::ref; +} #endif diff --git a/src/support/shared_ptr.h b/src/support/shared_ptr.h index 6976a5b4c5..a671211a5c 100644 --- a/src/support/shared_ptr.h +++ b/src/support/shared_ptr.h @@ -15,12 +15,20 @@ #if defined(_MSC_VER) && (_MSC_VER >= 1600) #include -using std::tr1::shared_ptr; + +namespace lyx +{ + using std::tr1::shared_ptr; +} #else #include -using boost::shared_ptr; + +namespace lyx +{ + using boost::shared_ptr; +} #endif -- 2.39.2