From a6abff23737d4d381d8adf7538de769672706351 Mon Sep 17 00:00:00 2001 From: khizmax Date: Fri, 14 Aug 2015 23:46:00 +0300 Subject: [PATCH] intrusive MultiLevelHashSet: comment std::iterator_traits --- cds/intrusive/impl/multilevel_hashset.h | 38 +++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/cds/intrusive/impl/multilevel_hashset.h b/cds/intrusive/impl/multilevel_hashset.h index 4ecdda58..0ea1ab60 100644 --- a/cds/intrusive/impl/multilevel_hashset.h +++ b/cds/intrusive/impl/multilevel_hashset.h @@ -3,8 +3,8 @@ #ifndef CDSLIB_INTRUSIVE_IMPL_MULTILEVEL_HASHSET_H #define CDSLIB_INTRUSIVE_IMPL_MULTILEVEL_HASHSET_H -#include // std::tie -#include // std::ref +#include // std::ref +#include // std::iterator_traits #include #include @@ -1339,4 +1339,38 @@ namespace cds { namespace intrusive { }; }} // namespace cds::intrusive +/* +//@cond +namespace std { + + template + struct iterator_traits< typename cds::intrusive::MultiLevelHashSet< GC, T, Traits >::iterator > + { + typedef typename cds::intrusive::MultiLevelHashSet< GC, T, Traits >::iterator iterator_class; + + // difference_type is not applicable for that iterator + // typedef ??? difference_type + typedef T value_type; + typedef typename iterator_class::value_ptr pointer; + typedef typename iterator_class::value_ref reference; + typedef bidirectional_iterator_tag iterator_category; + }; + + template + struct iterator_traits< typename cds::intrusive::MultiLevelHashSet< GC, T, Traits >::const_iterator > + { + typedef typename cds::intrusive::MultiLevelHashSet< GC, T, Traits >::const_iterator iterator_class; + + // difference_type is not applicable for that iterator + // typedef ??? difference_type + typedef T value_type; + typedef typename iterator_class::value_ptr pointer; + typedef typename iterator_class::value_ref reference; + typedef bidirectional_iterator_tag iterator_category; + }; + +} // namespace std +//@endcond +*/ + #endif // #ifndef CDSLIB_INTRUSIVE_IMPL_MULTILEVEL_HASHSET_H -- 2.34.1