shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
This commit is contained in:
@@ -12,23 +12,23 @@
|
||||
#ifndef BOOST_HAS_TR1_SHARED_PTR
|
||||
|
||||
//
|
||||
// This header can get included by boost/shared_ptr.hpp which leads
|
||||
// This header can get included by boost/std::shared_ptr.hpp which leads
|
||||
// to cyclic dependencies, the workaround is to forward declare all
|
||||
// the boost components, and then include the actual headers afterwards.
|
||||
// This is fragile, but seems to work, and doesn't require modification
|
||||
// of boost/shared_ptr.hpp.
|
||||
// of boost/std::shared_ptr.hpp.
|
||||
//
|
||||
namespace boost{
|
||||
|
||||
class bad_weak_ptr;
|
||||
template<class T> class weak_ptr;
|
||||
template<class T> class shared_ptr;
|
||||
template<class T> class std::shared_ptr;
|
||||
template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b) BOOST_NOEXCEPT;
|
||||
template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b) BOOST_NOEXCEPT;
|
||||
template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r) BOOST_NOEXCEPT;
|
||||
template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r) BOOST_NOEXCEPT;
|
||||
template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r) BOOST_NOEXCEPT;
|
||||
template<class D, class T> D * get_deleter(shared_ptr<T> const & p) BOOST_NOEXCEPT;
|
||||
template<class T> void swap(std::shared_ptr<T> & a, std::shared_ptr<T> & b) BOOST_NOEXCEPT;
|
||||
template<class T, class U> std::shared_ptr<T> static_pointer_cast(std::shared_ptr<U> const & r) BOOST_NOEXCEPT;
|
||||
template<class T, class U> std::shared_ptr<T> dynamic_pointer_cast(std::shared_ptr<U> const & r) BOOST_NOEXCEPT;
|
||||
template<class T, class U> std::shared_ptr<T> const_pointer_cast(std::shared_ptr<U> const & r) BOOST_NOEXCEPT;
|
||||
template<class D, class T> D * get_deleter(std::shared_ptr<T> const & p) BOOST_NOEXCEPT;
|
||||
template<class T> class enable_shared_from_this;
|
||||
|
||||
namespace detail{
|
||||
@@ -41,7 +41,7 @@ class weak_count;
|
||||
namespace std{ namespace tr1{
|
||||
|
||||
using ::boost::bad_weak_ptr;
|
||||
using ::boost::shared_ptr;
|
||||
using ::boost::std::shared_ptr;
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||
using ::boost::swap;
|
||||
#endif
|
||||
@@ -53,7 +53,7 @@ namespace std{ namespace tr1{
|
||||
using ::boost::enable_shared_from_this;
|
||||
|
||||
} }
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/std::shared_ptr.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user