This commit is contained in:
Georgy Guminov
2025-01-25 09:47:52 +03:00
parent fdfafce2b9
commit 5a4ba24d36
7 changed files with 76 additions and 64 deletions
+10 -11
View File
@@ -8,7 +8,6 @@
#define BOOST_ITERATOR_FACADE_23022003THW_HPP
#include <boost/config.hpp>
#include <boost/core/addressof.hpp>
#include <boost/iterator/interoperable.hpp>
#include <boost/iterator/iterator_traits.hpp>
@@ -171,7 +170,7 @@ namespace iterators {
// Provides (r++)->foo()
value_type* operator->() const
{
return boost::addressof(stored_value);
return std::addressof(stored_value);
}
private:
@@ -271,7 +270,7 @@ namespace iterators {
// Provides (r++)->foo()
value_type* operator->() const
{
return boost::addressof(dereference_proxy.stored_value);
return std::addressof(dereference_proxy.stored_value);
}
private:
@@ -372,15 +371,15 @@ namespace iterators {
{
struct proxy
{
explicit proxy(Reference const & x) : m_ref(x) {}
Reference* operator->() { return boost::addressof(m_ref); }
explicit proxy(Reference const& x) : m_ref(x) {}
Reference* operator->() { return std::addressof(m_ref); }
// This function is needed for MWCW and BCC, which won't call
// operator-> again automatically per 13.3.1.2 para 8
operator Reference*() { return boost::addressof(m_ref); }
operator Reference*() { return std::addressof(m_ref); }
Reference m_ref;
};
typedef proxy result_type;
static result_type apply(Reference const & x)
static result_type apply(Reference const& x)
{
return result_type(x);
}
@@ -392,7 +391,7 @@ namespace iterators {
typedef Pointer result_type;
static result_type apply(T& x)
{
return boost::addressof(x);
return std::addressof(x);
}
};
@@ -459,7 +458,7 @@ namespace iterators {
template <class Iterator>
typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, std::false_type)
{
return *iter;
return *iter;
}
struct choose_difference_type
@@ -762,11 +761,11 @@ namespace iterators {
typename boost::iterators::detail::operator_brackets_result<Derived, Value, reference>::type
operator[](difference_type n) const
{
const auto use_proxy = boost::iterators::detail::use_operator_brackets_proxy<Value, Reference>::value;
using use_proxy = boost::iterators::detail::use_operator_brackets_proxy<Value, Reference>;
return boost::iterators::detail::make_operator_brackets_result<Derived>(
this->derived() + n
, std::integral_constant<bool, use_proxy>{}
, std::integral_constant<bool, use_proxy::value>{}
);
}