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:
void_17
2026-03-02 15:58:20 +07:00
parent d63f79325f
commit 7074f35e4b
1373 changed files with 12054 additions and 12054 deletions

View File

@@ -21,7 +21,7 @@
#include <boost/exception/diagnostic_information.hpp>
#include <boost/exception/detail/type_info.hpp>
#include <boost/exception/detail/clone_current_exception.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <stdexcept>
#include <new>
#include <ios>
@@ -37,7 +37,7 @@ boost
class
exception_ptr
{
typedef boost::shared_ptr<exception_detail::clone_base const> impl;
typedef boost::std::shared_ptr<exception_detail::clone_base const> impl;
impl ptr_;
friend void rethrow_exception( exception_ptr const & );
typedef exception_detail::clone_base const * (impl::*unspecified_bool_type)() const;
@@ -122,7 +122,7 @@ boost
throw_function(BOOST_CURRENT_FUNCTION) <<
throw_file(__FILE__) <<
throw_line(__LINE__);
static exception_ptr ep(shared_ptr<exception_detail::clone_base const>(new exception_detail::clone_impl<Exception>(c)));
static exception_ptr ep(std::shared_ptr<exception_detail::clone_base const>(new exception_detail::clone_impl<Exception>(c)));
return ep;
}
@@ -305,7 +305,7 @@ boost
success:
{
BOOST_ASSERT(e!=0);
return exception_ptr(shared_ptr<exception_detail::clone_base const>(e));
return exception_ptr(std::shared_ptr<exception_detail::clone_base const>(e));
}
case exception_detail::clone_current_exception_result::
bad_alloc:
@@ -332,7 +332,7 @@ boost
catch(
exception_detail::clone_base & e )
{
return exception_ptr(shared_ptr<exception_detail::clone_base const>(e.clone()));
return exception_ptr(std::shared_ptr<exception_detail::clone_base const>(e.clone()));
}
catch(
std::domain_error & e )

View File

@@ -145,7 +145,7 @@ boost
#endif
template <class T>
class shared_ptr;
class std::shared_ptr;
namespace
exception_detail
@@ -157,8 +157,8 @@ boost
error_info_container
{
virtual char const * diagnostic_information( char const * ) const = 0;
virtual shared_ptr<error_info_base> get( type_info_ const & ) const = 0;
virtual void set( shared_ptr<error_info_base> const &, type_info_ const & ) = 0;
virtual std::shared_ptr<error_info_base> get( type_info_ const & ) const = 0;
virtual void set( std::shared_ptr<error_info_base> const &, type_info_ const & ) = 0;
virtual void add_ref() const = 0;
virtual bool release() const = 0;
virtual refcount_ptr<exception_detail::error_info_container> clone() const = 0;

View File

@@ -15,7 +15,7 @@
#include <boost/exception/exception.hpp>
#include <boost/exception/detail/error_info_impl.hpp>
#include <boost/exception/detail/type_info.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
namespace
boost
@@ -32,7 +32,7 @@ boost
get( exception const & x )
{
if( exception_detail::error_info_container * c=x.data_.get() )
if( shared_ptr<exception_detail::error_info_base> eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) )
if( std::shared_ptr<exception_detail::error_info_base> eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) )
{
#ifndef BOOST_NO_RTTI
BOOST_ASSERT( 0!=dynamic_cast<ErrorInfo *>(eib.get()) );

View File

@@ -15,7 +15,7 @@
#include <boost/exception/exception.hpp>
#include <boost/exception/to_string_stub.hpp>
#include <boost/exception/detail/error_info_impl.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <boost/config.hpp>
#include <map>
@@ -82,26 +82,26 @@ boost
}
void
set( shared_ptr<error_info_base> const & x, type_info_ const & typeid_ )
set( std::shared_ptr<error_info_base> const & x, type_info_ const & typeid_ )
{
BOOST_ASSERT(x);
info_[typeid_] = x;
diagnostic_info_str_.clear();
}
shared_ptr<error_info_base>
std::shared_ptr<error_info_base>
get( type_info_ const & ti ) const
{
error_info_map::const_iterator i=info_.find(ti);
if( info_.end()!=i )
{
shared_ptr<error_info_base> const & p = i->second;
std::shared_ptr<error_info_base> const & p = i->second;
#ifndef BOOST_NO_RTTI
BOOST_ASSERT( *BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==*ti.type_ );
#endif
return p;
}
return shared_ptr<error_info_base>();
return std::shared_ptr<error_info_base>();
}
char const *
@@ -125,7 +125,7 @@ boost
friend class boost::exception;
typedef std::map< type_info_, shared_ptr<error_info_base> > error_info_map;
typedef std::map< type_info_, std::shared_ptr<error_info_base> > error_info_map;
error_info_map info_;
mutable std::string diagnostic_info_str_;
mutable int count_;
@@ -168,7 +168,7 @@ boost
set_info( E const & x, error_info<Tag,T> const & v )
{
typedef error_info<Tag,T> error_info_tag_t;
shared_ptr<error_info_tag_t> p( new error_info_tag_t(v) );
std::shared_ptr<error_info_tag_t> p( new error_info_tag_t(v) );
exception_detail::error_info_container * c=x.data_.get();
if( !c )
x.data_.adopt(c=new exception_detail::error_info_container_impl);