mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
Add cbegin() and cend() from the new draft standard to the unordered containers.
The standard doesn't add them for local iterators, but I'm guessing that's an oversight. So for now, I've hidden them behind a preprocessor condition. Which I'll probably remove before review. [SVN r2944]
This commit is contained in:
@ -172,6 +172,16 @@ namespace boost
|
||||
return const_iterator(base.end());
|
||||
}
|
||||
|
||||
const_iterator cbegin() const
|
||||
{
|
||||
return const_iterator(base.begin());
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
{
|
||||
return const_iterator(base.end());
|
||||
}
|
||||
|
||||
// modifiers
|
||||
|
||||
std::pair<iterator, bool> insert(const value_type& obj)
|
||||
@ -321,6 +331,18 @@ namespace boost
|
||||
return const_local_iterator(base.end(n));
|
||||
}
|
||||
|
||||
#if defined(BOOST_UNORDERED_LOCAL_CBEGIN)
|
||||
const_local_iterator cbegin(size_type n) const
|
||||
{
|
||||
return const_local_iterator(base.begin(n));
|
||||
}
|
||||
|
||||
const_local_iterator cend(size_type n) const
|
||||
{
|
||||
return const_local_iterator(base.end(n));
|
||||
}
|
||||
#endif
|
||||
|
||||
// hash policy
|
||||
|
||||
float load_factor() const
|
||||
@ -475,6 +497,16 @@ namespace boost
|
||||
return const_iterator(base.end());
|
||||
}
|
||||
|
||||
const_iterator cbegin() const
|
||||
{
|
||||
return const_iterator(base.begin());
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
{
|
||||
return const_iterator(base.end());
|
||||
}
|
||||
|
||||
// modifiers
|
||||
|
||||
iterator insert(const value_type& obj)
|
||||
@ -618,6 +650,18 @@ namespace boost
|
||||
return const_local_iterator(base.end(n));
|
||||
}
|
||||
|
||||
#if defined(BOOST_UNORDERED_LOCAL_CBEGIN)
|
||||
const_local_iterator cbegin(size_type n) const
|
||||
{
|
||||
return const_local_iterator(base.begin(n));
|
||||
}
|
||||
|
||||
const_local_iterator cend(size_type n) const
|
||||
{
|
||||
return const_local_iterator(base.end(n));
|
||||
}
|
||||
#endif
|
||||
|
||||
// hash policy
|
||||
|
||||
float load_factor() const
|
||||
|
@ -144,6 +144,16 @@ namespace boost
|
||||
return const_iterator(base.end());
|
||||
}
|
||||
|
||||
const_iterator cbegin() const
|
||||
{
|
||||
return const_iterator(base.begin());
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
{
|
||||
return const_iterator(base.end());
|
||||
}
|
||||
|
||||
// modifiers
|
||||
|
||||
std::pair<iterator, bool> insert(const value_type& obj)
|
||||
@ -261,6 +271,17 @@ namespace boost
|
||||
return const_local_iterator(base.end(n));
|
||||
}
|
||||
|
||||
#if defined(BOOST_UNORDERED_LOCAL_CBEGIN)
|
||||
const_local_iterator cbegin(size_type n) const
|
||||
{
|
||||
return const_local_iterator(base.begin(n));
|
||||
}
|
||||
|
||||
const_local_iterator cend(size_type n) const
|
||||
{
|
||||
return const_local_iterator(base.end(n));
|
||||
}
|
||||
#endif
|
||||
|
||||
// hash policy
|
||||
|
||||
@ -413,6 +434,16 @@ namespace boost
|
||||
return const_iterator(base.end());
|
||||
}
|
||||
|
||||
const_iterator cbegin() const
|
||||
{
|
||||
return const_iterator(base.begin());
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
{
|
||||
return const_iterator(base.end());
|
||||
}
|
||||
|
||||
// modifiers
|
||||
|
||||
iterator insert(const value_type& obj)
|
||||
@ -529,6 +560,18 @@ namespace boost
|
||||
return const_local_iterator(base.end(n));
|
||||
}
|
||||
|
||||
#if defined(BOOST_UNORDERED_LOCAL_CBEGIN)
|
||||
const_local_iterator cbegin(size_type n) const
|
||||
{
|
||||
return const_local_iterator(base.begin(n));
|
||||
}
|
||||
|
||||
const_local_iterator cend(size_type n) const
|
||||
{
|
||||
return const_local_iterator(base.end(n));
|
||||
}
|
||||
#endif
|
||||
|
||||
// hash policy
|
||||
|
||||
float load_factor() const
|
||||
|
Reference in New Issue
Block a user