//@{
const_iterator begin() const
{
- return get_const_begin();
+ return cbegin();
}
- const_iterator cbegin()
+ const_iterator cbegin() const
{
- return get_const_begin();
+ return const_iterator( m_Buckets[0].cbegin(), m_Buckets, m_Buckets + bucket_count() );
}
//@}
//@{
const_iterator end() const
{
- return get_const_end();
+ return cend();
}
- const_iterator cend()
+ const_iterator cend() const
{
- return get_const_end();
+ return const_iterator( m_Buckets[bucket_count() - 1].cend(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
}
//@}
- private:
- //@cond
- const_iterator get_const_begin() const
- {
- return const_iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count() );
- }
- const_iterator get_const_end() const
- {
- return const_iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
- }
- //@endcond
-
public:
/// Initializes hash set
/** @copydetails cds_intrusive_MichaelHashSet_hp_ctor