aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhiddenpath <hiddenpath@yandex-team.com>2024-01-22 14:54:41 +0300
committerAlexander Smirnov <alex@ydb.tech>2024-01-24 15:01:56 +0300
commit79028cb8784083d0e6dbad6c7daedfe70bf70e8f (patch)
tree417d7dde9c02d3e6c8dba17225f49164185c23b3
parentf9c0a703691c7d886cbae6a267bc7eed3f56896b (diff)
downloadydb-79028cb8784083d0e6dbad6c7daedfe70bf70e8f.tar.gz
Specialize iterator_traits for TIpAddressRange iterator
``` In file included from $(SOURCE_ROOT)/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_move_common.h:12: $(SOURCE_ROOT)/contrib/libs/cxxsupp/libcxx/include/__algorithm/iterator_operations.h:72:3: error: no type named 'value_type' in 'std::iterator_traits<TIpAddressRange::TIterator>' using __value_type = typename iterator_traits<_Iter>::value_type; ^~~~~ $(SOURCE_ROOT)/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_move_common.h:149:62: note: in instantiation of template type alias '__value_type' requested here using _InValue = typename _IterOps<_AlgPolicy>::template __value_type<_InIter>; ```
-rw-r--r--library/cpp/ipmath/ipmath.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/cpp/ipmath/ipmath.h b/library/cpp/ipmath/ipmath.h
index 8c24bd471c..76067af972 100644
--- a/library/cpp/ipmath/ipmath.h
+++ b/library/cpp/ipmath/ipmath.h
@@ -152,6 +152,11 @@ private:
class TIpAddressRange::TIterator {
public:
+ using value_type = TIpv6Address;
+ using difference_type = std::ptrdiff_t;
+ using reference = TIpv6Address&;
+ using iterator_category = std::forward_iterator_tag;
+
TIterator(TIpv6Address val) noexcept;
bool operator==(const TIpAddressRange::TIterator& other) noexcept;