From: khizmax Date: Fri, 14 Aug 2015 20:46:00 +0000 (+0300) Subject: intrusive MultiLevelHashSet: comment std::iterator_traits X-Git-Tag: v2.1.0~158 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a6abff23737d4d381d8adf7538de769672706351;p=libcds.git intrusive MultiLevelHashSet: comment std::iterator_traits --- 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