OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const > Class Template Reference

Detailed Description

template<class ValueType, class KeySelect, class ValueSelect, class Hash, class KeyEqual, class Allocator, unsigned int NeighborhoodSize, bool StoreHash, class GrowthPolicy, class OverflowContainer>
template<bool is_const>
class tsl::detail_hopscotch_hash::hopscotch_hash< ValueType, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, OverflowContainer >::hopscotch_iterator< is_const >

The 'operator*()' and 'operator->()' methods return a const reference and const pointer respectively to the stored value type.

In case of a map, to get a modifiable reference to the value associated to a key (the '.second' in the stored pair), you have to call 'value()'.

Definition at line 641 of file hopscotch_hash.h.

#include <hopscotch_hash.h>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = const typename hopscotch_hash::value_type
 
using difference_type = std::ptrdiff_t
 
using reference = value_type &
 
using pointer = value_type *
 

Public Member Functions

 hopscotch_iterator (const hopscotch_iterator< false > &other) noexcept
 
const hopscotch_hash::key_type & key () const
 
template<class U = ValueSelect, typename std::enable_if< has_mapped_type< U >::value >::type * = nullptr>
std::conditional< is_const, const typename U::value_type &, typename U::value_type & >::type value () const
 
reference operator * () const
 
pointer operator-> () const
 
hopscotch_iteratoroperator++ ()
 
hopscotch_iterator operator++ (int)
 

Private Types

using iterator_bucket = typename std::conditional< is_const, typename hopscotch_hash::const_iterator_buckets, typename hopscotch_hash::iterator_buckets >::type
 
using iterator_overflow = typename std::conditional< is_const, typename hopscotch_hash::const_iterator_overflow, typename hopscotch_hash::iterator_overflow >::type
 

Private Member Functions

 hopscotch_iterator (iterator_bucket buckets_iterator, iterator_bucket buckets_end_iterator, iterator_overflow overflow_iterator) noexcept
 

Private Attributes

iterator_bucket m_buckets_iterator
 
iterator_bucket m_buckets_end_iterator
 
iterator_overflow m_overflow_iterator
 

Friends

class hopscotch_hash
 
bool operator== (const hopscotch_iterator &lhs, const hopscotch_iterator &rhs)
 
bool operator!= (const hopscotch_iterator &lhs, const hopscotch_iterator &rhs)
 

The documentation for this class was generated from the following file: