diff options
author | arcadia-devtools <[email protected]> | 2022-02-10 17:53:52 +0300 |
---|---|---|
committer | arcadia-devtools <[email protected]> | 2022-02-10 17:53:52 +0300 |
commit | 5c64b97bb7e4034eff8833e4c367f61d34fcb4ee (patch) | |
tree | 7c5769528f2fcdaa5a718aa73e4aa64d50905269 /contrib/libs/cxxsupp/libcxx/include/__iterator | |
parent | 1b56f620ac98766b198121ca1b728e7e61efbb56 (diff) |
intermediate changes
ref:4635f4dd763168c3fa295f87727595c785b4d5a4
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__iterator')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h index 0a978914b1a..28872f9fa41 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h +++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h @@ -13,6 +13,7 @@ #include <__config> #include <__debug> #include <__iterator/iterator_traits.h> +#include <__memory/addressof.h> #include <__memory/pointer_traits.h> #include <type_traits> @@ -54,7 +55,7 @@ public: : __i(__u.base()) { #if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__iterator_copy(this, &__u); + __get_db()->__iterator_copy(this, _VSTD::addressof(__u)); #endif } #if _LIBCPP_DEBUG_LEVEL == 2 @@ -62,14 +63,14 @@ public: __wrap_iter(const __wrap_iter& __x) : __i(__x.base()) { - __get_db()->__iterator_copy(this, &__x); + __get_db()->__iterator_copy(this, _VSTD::addressof(__x)); } _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter& operator=(const __wrap_iter& __x) { - if (this != &__x) + if (this != _VSTD::addressof(__x)) { - __get_db()->__iterator_copy(this, &__x); + __get_db()->__iterator_copy(this, _VSTD::addressof(__x)); __i = __x.__i; } return *this; @@ -180,7 +181,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT { #if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y), + _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(_VSTD::addressof(__x), _VSTD::addressof(__y)), "Attempted to compare incomparable iterators"); #endif return __x.base() < __y.base(); @@ -264,7 +265,7 @@ operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXC #endif // C++03 { #if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y), + _LIBCPP_ASSERT(__get_const_db()->__less_than_comparable(_VSTD::addressof(__x), _VSTD::addressof(__y)), "Attempted to subtract incompatible iterators"); #endif return __x.base() - __y.base(); |