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

@@ -14,7 +14,7 @@
#endif
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <boost/proto/traits.hpp>
#include <boost/xpressive/detail/detail_fwd.hpp>
#include <boost/xpressive/detail/dynamic/matchable.hpp>
@@ -41,7 +41,7 @@ struct core_access
return rex.match_(state);
}
static shared_ptr<detail::regex_impl<BidiIter> > const &
static std::shared_ptr<detail::regex_impl<BidiIter> > const &
get_regex_impl(basic_regex<BidiIter> const &rex)
{
return proto::value(rex).get();

View File

@@ -20,7 +20,7 @@
#include <stack>
#include <limits>
#include <typeinfo>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/version.hpp>

View File

@@ -15,7 +15,7 @@
#include <boost/assert.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <boost/xpressive/regex_error.hpp>
#include <boost/xpressive/regex_constants.hpp>
#include <boost/xpressive/detail/detail_fwd.hpp>
@@ -41,7 +41,7 @@ namespace boost { namespace xpressive { namespace detail
// we don't have to worry about it going away.
regex_impl<BidiIter> const *pimpl_;
regex_byref_matcher(shared_ptr<regex_impl<BidiIter> > const &impl)
regex_byref_matcher(std::shared_ptr<regex_impl<BidiIter> > const &impl)
: wimpl_(impl)
, pimpl_(impl.get())
{

View File

@@ -34,7 +34,7 @@ namespace boost { namespace xpressive { namespace detail
{
regex_impl<BidiIter> impl_;
regex_matcher(shared_ptr<regex_impl<BidiIter> > const &impl)
regex_matcher(std::shared_ptr<regex_impl<BidiIter> > const &impl)
: impl_()
{
this->impl_.xpr_ = impl->xpr_;

View File

@@ -20,7 +20,7 @@
#include <typeinfo>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/size_t.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <boost/xpressive/xpressive_fwd.hpp>
namespace boost { namespace xpressive { namespace detail
@@ -353,7 +353,7 @@ namespace boost { namespace xpressive { namespace detail
int get_mark_number(basic_mark_tag const &);
template<typename Xpr, typename BidiIter>
void static_compile(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl);
void static_compile(Xpr const &xpr, std::shared_ptr<regex_impl<BidiIter> > const &impl);
struct quant_spec;

View File

@@ -32,7 +32,7 @@ namespace boost { namespace xpressive { namespace detail
///////////////////////////////////////////////////////////////////////////////
// static_compile_impl2
template<typename Xpr, typename BidiIter, typename Traits>
void static_compile_impl2(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl, Traits const &tr)
void static_compile_impl2(Xpr const &xpr, std::shared_ptr<regex_impl<BidiIter> > const &impl, Traits const &tr)
{
typedef typename iterator_value<BidiIter>::type char_type;
impl->tracking_clear();
@@ -70,7 +70,7 @@ namespace boost { namespace xpressive { namespace detail
// static_compile_impl1
template<typename Xpr, typename BidiIter>
typename disable_if<proto::matches<Xpr, XpressiveLocaleModifier> >::type
static_compile_impl1(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl)
static_compile_impl1(Xpr const &xpr, std::shared_ptr<regex_impl<BidiIter> > const &impl)
{
// use default traits
typedef typename iterator_value<BidiIter>::type char_type;
@@ -83,7 +83,7 @@ namespace boost { namespace xpressive { namespace detail
// static_compile_impl1
template<typename Xpr, typename BidiIter>
typename enable_if<proto::matches<Xpr, XpressiveLocaleModifier> >::type
static_compile_impl1(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl)
static_compile_impl1(Xpr const &xpr, std::shared_ptr<regex_impl<BidiIter> > const &impl)
{
// use specified traits
typedef typename proto::result_of::value<typename proto::result_of::left<Xpr>::type>::type::locale_type locale_type;
@@ -94,7 +94,7 @@ namespace boost { namespace xpressive { namespace detail
///////////////////////////////////////////////////////////////////////////////
// static_compile
template<typename Xpr, typename BidiIter>
void static_compile(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl)
void static_compile(Xpr const &xpr, std::shared_ptr<regex_impl<BidiIter> > const &impl)
{
static_compile_impl1(xpr, impl);
}

View File

@@ -17,7 +17,7 @@
#endif
#include <string>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <boost/xpressive/detail/core/quant_style.hpp>
#include <boost/xpressive/detail/core/regex_impl.hpp>

View File

@@ -14,7 +14,7 @@
#endif
#include <boost/ref.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <boost/xpressive/detail/detail_fwd.hpp>
#include <boost/xpressive/detail/core/regex_impl.hpp>
#include <boost/xpressive/detail/static/transmogrify.hpp>
@@ -27,7 +27,7 @@ namespace boost { namespace xpressive { namespace detail
template<typename BidiIter>
struct xpression_visitor_base
{
explicit xpression_visitor_base(shared_ptr<regex_impl<BidiIter> > const &self)
explicit xpression_visitor_base(std::shared_ptr<regex_impl<BidiIter> > const &self)
: self_(self)
{
}
@@ -51,7 +51,7 @@ namespace boost { namespace xpressive { namespace detail
}
}
shared_ptr<regex_impl<BidiIter> > &self()
std::shared_ptr<regex_impl<BidiIter> > &self()
{
return this->self_;
}
@@ -94,7 +94,7 @@ namespace boost { namespace xpressive { namespace detail
}
private:
shared_ptr<regex_impl<BidiIter> > self_;
std::shared_ptr<regex_impl<BidiIter> > self_;
};
///////////////////////////////////////////////////////////////////////////////
@@ -108,7 +108,7 @@ namespace boost { namespace xpressive { namespace detail
typedef Traits traits_type;
typedef typename boost::iterator_value<BidiIter>::type char_type;
explicit xpression_visitor(Traits const &tr, shared_ptr<regex_impl<BidiIter> > const &self)
explicit xpression_visitor(Traits const &tr, std::shared_ptr<regex_impl<BidiIter> > const &self)
: xpression_visitor_base<BidiIter>(self)
, traits_(tr)
{

View File

@@ -26,7 +26,7 @@
#include <boost/range/end.hpp>
#include <boost/range/value_type.hpp>
#include <boost/range/const_iterator.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
namespace boost { namespace xpressive { namespace detail
{
@@ -75,9 +75,9 @@ namespace boost { namespace xpressive { namespace detail
private:
///////////////////////////////////////////////////////////////////////////////
// struct node : a node in the TST.
// struct node : a node in the TST.
// The "eq" field stores the result pointer when ch is zero.
//
//
struct node
: boost::noncopyable
{
@@ -125,7 +125,7 @@ namespace boost { namespace xpressive { namespace detail
///////////////////////////////////////////////////////////////////////////////
// insert : insert a string into the TST
//
//
template<typename Trans>
node* insert(node* p, key_iterator &begin, key_iterator end, result_type r, Trans trans) const
{
@@ -168,7 +168,7 @@ namespace boost { namespace xpressive { namespace detail
///////////////////////////////////////////////////////////////////////////////
// conditional rotation : the goal is to minimize the overall
// weighted path length of each binary search tree
//
//
bool cond_rotation(bool left, node* const i, node* const j) const
{
// don't rotate top node in binary search tree
@@ -201,7 +201,7 @@ namespace boost { namespace xpressive { namespace detail
///////////////////////////////////////////////////////////////////////////////
// search : find a string in the TST
//
//
template<typename BidiIter, typename Trans>
result_type search(BidiIter &begin, BidiIter end, Trans trans, node* p) const
{
@@ -276,7 +276,7 @@ namespace boost { namespace xpressive { namespace detail
}
}
boost::shared_ptr<node> root;
boost::std::shared_ptr<node> root;
};
}}} // namespace boost::xpressive::detail

View File

@@ -21,7 +21,7 @@
#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <boost/weak_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/detail/workaround.hpp>
@@ -48,7 +48,7 @@ struct weak_iterator
: iterator_facade
<
weak_iterator<Derived>
, shared_ptr<Derived> const
, std::shared_ptr<Derived> const
, std::forward_iterator_tag
>
{
@@ -73,7 +73,7 @@ struct weak_iterator
private:
friend class boost::iterator_core_access;
shared_ptr<Derived> const &dereference() const
std::shared_ptr<Derived> const &dereference() const
{
return this->cur_;
}
@@ -102,7 +102,7 @@ private:
this->cur_.reset();
}
shared_ptr<Derived> cur_;
std::shared_ptr<Derived> cur_;
base_iterator iter_;
set_type *set_;
};
@@ -112,14 +112,14 @@ private:
// for use with a filter_iterator to filter a node out of a list of dependencies
template<typename Derived>
struct filter_self
: std::unary_function<shared_ptr<Derived>, bool>
: std::unary_function<std::shared_ptr<Derived>, bool>
{
filter_self(enable_reference_tracking<Derived> *self)
: self_(self)
{
}
bool operator ()(shared_ptr<Derived> const &that) const
bool operator ()(std::shared_ptr<Derived> const &that) const
{
return this->self_ != that.get();
}
@@ -144,7 +144,7 @@ void adl_swap(T &t1, T &t2)
template<typename Derived>
struct enable_reference_tracking
{
typedef std::set<shared_ptr<Derived> > references_type;
typedef std::set<std::shared_ptr<Derived> > references_type;
typedef std::set<weak_ptr<Derived> > dependents_type;
void tracking_copy(Derived const &that)
@@ -321,7 +321,7 @@ private:
references_type refs_;
dependents_type deps_;
shared_ptr<Derived> self_;
std::shared_ptr<Derived> self_;
boost::detail::atomic_count cnt_;
};
@@ -345,7 +345,7 @@ inline void intrusive_ptr_release(enable_reference_tracking<Derived> *p)
template<typename Derived>
inline void enable_reference_tracking<Derived>::dump_(std::ostream &sout) const
{
shared_ptr<Derived> this_ = this->self_;
std::shared_ptr<Derived> this_ = this->self_;
sout << "0x" << (void*)this << " cnt=" << this_.use_count()-1 << " refs={";
typename references_type::const_iterator cur1 = this->refs_.begin();
typename references_type::const_iterator end1 = this->refs_.end();
@@ -358,8 +358,8 @@ inline void enable_reference_tracking<Derived>::dump_(std::ostream &sout) const
typename dependents_type::const_iterator end2 = this->deps_.end();
for(; cur2 != end2; ++cur2)
{
// ericne, 27/nov/05: CW9_4 doesn't like if(shared_ptr x = y)
shared_ptr<Derived> dep = cur2->lock();
// ericne, 27/nov/05: CW9_4 doesn't like if(std::shared_ptr x = y)
std::shared_ptr<Derived> dep = cur2->lock();
if(dep.get())
{
sout << "0x" << (void*)&*dep << ',';
@@ -425,7 +425,7 @@ struct tracking_ptr
}
// calling this forces this->impl_ to fork.
shared_ptr<element_type> const &get() const
std::shared_ptr<element_type> const &get() const
{
if(intrusive_ptr<element_type> impl = this->fork_())
{
@@ -480,7 +480,7 @@ private:
{
impl = this->impl_;
BOOST_ASSERT(!this->has_deps_());
shared_ptr<element_type> simpl(new element_type);
std::shared_ptr<element_type> simpl(new element_type);
this->impl_ = get_pointer(simpl->self_ = simpl);
}
return impl;

View File

@@ -375,7 +375,7 @@ private:
, "mismatched parenthesis"
);
basic_regex<BidiIter> &rex = this->rules_[name];
shared_ptr<detail::regex_impl<BidiIter> > impl = access::get_regex_impl(rex);
std::shared_ptr<detail::regex_impl<BidiIter> > impl = access::get_regex_impl(rex);
this->self_->track_reference(*impl);
return detail::make_dynamic<BidiIter>(detail::regex_byref_matcher<BidiIter>(impl));
}
@@ -735,7 +735,7 @@ private:
std::size_t hidden_mark_count_;
CompilerTraits traits_;
typename RegexTraits::char_class_type upper_;
shared_ptr<detail::regex_impl<BidiIter> > self_;
std::shared_ptr<detail::regex_impl<BidiIter> > self_;
std::map<string_type, basic_regex<BidiIter> > rules_;
};