|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81066 - in branches/release/boost: container container/detail intrusive
From: jeffrey.hellrung_at_[hidden]
Date: 2012-10-25 22:55:59
Author: jeffrey.hellrung
Date: 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
New Revision: 81066
URL: http://svn.boost.org/trac/boost/changeset/81066
Log:
merge trunk to release; fixes #7531 variable shadowing warning in container and intrusive
Properties modified:
branches/release/boost/container/ (props changed)
branches/release/boost/intrusive/ (props changed)
Text files modified:
branches/release/boost/container/detail/flat_tree.hpp | 56 +++++-----
branches/release/boost/container/detail/multiallocation_chain.hpp | 24 ++--
branches/release/boost/container/flat_map.hpp | 12 +-
branches/release/boost/container/flat_set.hpp | 12 +-
branches/release/boost/container/map.hpp | 4
branches/release/boost/container/set.hpp | 4
branches/release/boost/container/stable_vector.hpp | 6
branches/release/boost/container/string.hpp | 28 ++--
branches/release/boost/intrusive/avltree.hpp | 12 +-
branches/release/boost/intrusive/hashtable.hpp | 188 ++++++++++++++++++++-------------------
branches/release/boost/intrusive/list.hpp | 14 +-
branches/release/boost/intrusive/sgtree.hpp | 8
branches/release/boost/intrusive/slist.hpp | 80 ++++++++--------
branches/release/boost/intrusive/splaytree.hpp | 4
branches/release/boost/intrusive/treap.hpp | 8
15 files changed, 231 insertions(+), 229 deletions(-)
Modified: branches/release/boost/container/detail/flat_tree.hpp
==============================================================================
--- branches/release/boost/container/detail/flat_tree.hpp (original)
+++ branches/release/boost/container/detail/flat_tree.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -48,7 +48,7 @@
typedef Value first_argument_type;
typedef Value second_argument_type;
typedef bool return_type;
- public:
+ public:
flat_tree_value_compare()
: Compare()
{}
@@ -65,7 +65,7 @@
const Compare &get_comp() const
{ return *this; }
-
+
Compare &get_comp()
{ return *this; }
};
@@ -238,7 +238,7 @@
flat_tree& operator=(BOOST_RV_REF(flat_tree) mx)
{ m_data = boost::move(mx.m_data); return *this; }
- public:
+ public:
// accessors:
Compare key_comp() const
{ return this->m_data.get_comp(); }
@@ -446,11 +446,11 @@
//Loop in burst sizes
while(len){
const size_type burst = len < BurstSize ? len : BurstSize;
- const const_iterator cend(this->cend());
+ const const_iterator cend_(this->cend());
len -= burst;
for(size_type i = 0; i != burst; ++i){
//Get the insertion position for each key
- pos = const_cast<const flat_tree&>(*this).priv_upper_bound(pos, cend, KeyOfValue()(*first));
+ pos = const_cast<const flat_tree&>(*this).priv_upper_bound(pos, cend_, KeyOfValue()(*first));
positions[i] = static_cast<size_type>(pos - beg);
++first;
}
@@ -497,14 +497,14 @@
while(len){
const size_type burst = len < BurstSize ? len : BurstSize;
size_type unique_burst = 0u;
- const const_iterator cend(this->cend());
+ const const_iterator cend_(this->cend());
while(unique_burst < burst && len > 0){
//Get the insertion position for each key
const value_type & val = *first++;
--len;
- pos = const_cast<const flat_tree&>(*this).priv_lower_bound(pos, cend, KeyOfValue()(val));
+ pos = const_cast<const flat_tree&>(*this).priv_lower_bound(pos, cend_, KeyOfValue()(val));
//Check if already present
- if(pos != cend && !value_comp(val, *pos)){
+ if(pos != cend_ && !value_comp(val, *pos)){
if(unique_burst > 0){
++skips[unique_burst-1];
}
@@ -692,22 +692,22 @@
// set operations:
iterator find(const key_type& k)
{
- const Compare &key_comp = this->m_data.get_comp();
+ const Compare &key_comp_ = this->m_data.get_comp();
iterator i = this->lower_bound(k);
- if (i != this->end() && key_comp(k, KeyOfValue()(*i))){
- i = this->end();
+ if (i != this->end() && key_comp_(k, KeyOfValue()(*i))){
+ i = this->end();
}
return i;
}
const_iterator find(const key_type& k) const
{
- const Compare &key_comp = this->m_data.get_comp();
+ const Compare &key_comp_ = this->m_data.get_comp();
const_iterator i = this->lower_bound(k);
- if (i != this->end() && key_comp(k, KeyOfValue()(*i))){
- i = this->end();
+ if (i != this->end() && key_comp_(k, KeyOfValue()(*i))){
+ i = this->end();
}
return i;
}
@@ -737,11 +737,11 @@
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
{ return this->priv_equal_range(this->begin(), this->end(), k); }
- size_type capacity() const
+ size_type capacity() const
{ return this->m_data.m_vect.capacity(); }
- void reserve(size_type count)
- { this->m_data.m_vect.reserve(count); }
+ void reserve(size_type count_)
+ { this->m_data.m_vect.reserve(count_); }
private:
struct insert_commit_data
@@ -780,13 +780,13 @@
}
std::pair<iterator,bool> priv_insert_unique_prepare
- (const_iterator beg, const_iterator end, const value_type& val, insert_commit_data &commit_data)
+ (const_iterator beg, const_iterator end_, const value_type& val, insert_commit_data &commit_data)
{
const value_compare &value_comp = this->m_data;
- commit_data.position = this->priv_lower_bound(beg, end, KeyOfValue()(val));
+ commit_data.position = this->priv_lower_bound(beg, end_, KeyOfValue()(val));
return std::pair<iterator,bool>
( *reinterpret_cast<iterator*>(&commit_data.position)
- , commit_data.position == end || value_comp(val, *commit_data.position));
+ , commit_data.position == end_ || value_comp(val, *commit_data.position));
}
std::pair<iterator,bool> priv_insert_unique_prepare
@@ -854,7 +854,7 @@
RanIt priv_lower_bound(RanIt first, RanIt last,
const key_type & key) const
{
- const Compare &key_comp = this->m_data.get_comp();
+ const Compare &key_comp_ = this->m_data.get_comp();
KeyOfValue key_extract;
difference_type len = last - first, half;
RanIt middle;
@@ -864,7 +864,7 @@
middle = first;
middle += half;
- if (key_comp(key_extract(*middle), key)) {
+ if (key_comp_(key_extract(*middle), key)) {
++middle;
first = middle;
len = len - half - 1;
@@ -879,7 +879,7 @@
RanIt priv_upper_bound(RanIt first, RanIt last,
const key_type & key) const
{
- const Compare &key_comp = this->m_data.get_comp();
+ const Compare &key_comp_ = this->m_data.get_comp();
KeyOfValue key_extract;
difference_type len = last - first, half;
RanIt middle;
@@ -889,12 +889,12 @@
middle = first;
middle += half;
- if (key_comp(key, key_extract(*middle))) {
+ if (key_comp_(key, key_extract(*middle))) {
len = half;
}
else{
first = ++middle;
- len = len - half - 1;
+ len = len - half - 1;
}
}
return first;
@@ -904,7 +904,7 @@
std::pair<RanIt, RanIt>
priv_equal_range(RanIt first, RanIt last, const key_type& key) const
{
- const Compare &key_comp = this->m_data.get_comp();
+ const Compare &key_comp_ = this->m_data.get_comp();
KeyOfValue key_extract;
difference_type len = last - first, half;
RanIt middle, left, right;
@@ -914,12 +914,12 @@
middle = first;
middle += half;
- if (key_comp(key_extract(*middle), key)){
+ if (key_comp_(key_extract(*middle), key)){
first = middle;
++first;
len = len - half - 1;
}
- else if (key_comp(key, key_extract(*middle))){
+ else if (key_comp_(key, key_extract(*middle))){
len = half;
}
else {
Modified: branches/release/boost/container/detail/multiallocation_chain.hpp
==============================================================================
--- branches/release/boost/container/detail/multiallocation_chain.hpp (original)
+++ branches/release/boost/container/detail/multiallocation_chain.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -126,22 +126,22 @@
return ret;
}
- void splice_after(iterator after_this, basic_multiallocation_chain &x, iterator before_begin, iterator before_end)
- { slist_impl_.splice_after(after_this, x.slist_impl_, before_begin, before_end); }
+ void splice_after(iterator after_this, basic_multiallocation_chain &x, iterator before_begin_, iterator before_end)
+ { slist_impl_.splice_after(after_this, x.slist_impl_, before_begin_, before_end); }
- void splice_after(iterator after_this, basic_multiallocation_chain &x, iterator before_begin, iterator before_end, size_type n)
- { slist_impl_.splice_after(after_this, x.slist_impl_, before_begin, before_end, n); }
+ void splice_after(iterator after_this, basic_multiallocation_chain &x, iterator before_begin_, iterator before_end, size_type n)
+ { slist_impl_.splice_after(after_this, x.slist_impl_, before_begin_, before_end, n); }
void splice_after(iterator after_this, basic_multiallocation_chain &x)
{ slist_impl_.splice_after(after_this, x.slist_impl_); }
- void incorporate_after(iterator after_this, void_pointer begin , iterator before_end)
+ void incorporate_after(iterator after_this, void_pointer begin_ , iterator before_end)
{
- slist_impl_.incorporate_after(after_this, to_node_ptr(begin), to_node_ptr(before_end));
+ slist_impl_.incorporate_after(after_this, to_node_ptr(begin_), to_node_ptr(before_end));
}
- void incorporate_after(iterator after_this, void_pointer begin, void_pointer before_end, size_type n)
- { slist_impl_.incorporate_after(after_this, to_node_ptr(begin), to_node_ptr(before_end), n); }
+ void incorporate_after(iterator after_this, void_pointer begin_, void_pointer before_end, size_type n)
+ { slist_impl_.incorporate_after(after_this, to_node_ptr(begin_), to_node_ptr(before_end), n); }
void swap(basic_multiallocation_chain &x)
{ slist_impl_.swap(x.slist_impl_); }
@@ -217,11 +217,11 @@
void swap(transform_multiallocation_chain &other_chain)
{ holder_.swap(other_chain.holder_); }
- void splice_after(iterator after_this, transform_multiallocation_chain &x, iterator before_begin, iterator before_end, size_type n)
- { holder_.splice_after(after_this.base(), x.holder_, before_begin.base(), before_end.base(), n); }
+ void splice_after(iterator after_this, transform_multiallocation_chain &x, iterator before_begin_, iterator before_end, size_type n)
+ { holder_.splice_after(after_this.base(), x.holder_, before_begin_.base(), before_end.base(), n); }
- void incorporate_after(iterator after_this, pointer begin, pointer before_end, size_type n)
- { holder_.incorporate_after(after_this.base(), begin, before_end, n); }
+ void incorporate_after(iterator after_this, pointer begin_, pointer before_end, size_type n)
+ { holder_.incorporate_after(after_this.base(), begin_, before_end, n); }
pointer pop_front()
{ return cast(holder_.pop_front()); }
Modified: branches/release/boost/container/flat_map.hpp
==============================================================================
--- branches/release/boost/container/flat_map.hpp (original)
+++ branches/release/boost/container/flat_map.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -418,7 +418,7 @@
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
- size_type capacity() const
+ size_type capacity() const
{ return m_flat_tree.capacity(); }
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
@@ -430,8 +430,8 @@
//!
//! <b>Note</b>: If capacity() is less than "count", iterators and references to
//! to values might be invalidated.
- void reserve(size_type count)
- { m_flat_tree.reserve(count); }
+ void reserve(size_type count_)
+ { m_flat_tree.reserve(count_); }
//! <b>Effects</b>: Tries to deallocate the excess of memory created
// with previous allocations. The size of the vector is unchanged
@@ -1266,7 +1266,7 @@
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
- size_type capacity() const
+ size_type capacity() const
{ return m_flat_tree.capacity(); }
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
@@ -1278,8 +1278,8 @@
//!
//! <b>Note</b>: If capacity() is less than "count", iterators and references to
//! to values might be invalidated.
- void reserve(size_type count)
- { m_flat_tree.reserve(count); }
+ void reserve(size_type count_)
+ { m_flat_tree.reserve(count_); }
//! <b>Effects</b>: Tries to deallocate the excess of memory created
// with previous allocations. The size of the vector is unchanged
Modified: branches/release/boost/container/flat_set.hpp
==============================================================================
--- branches/release/boost/container/flat_set.hpp (original)
+++ branches/release/boost/container/flat_set.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -365,7 +365,7 @@
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
- size_type capacity() const
+ size_type capacity() const
{ return m_flat_tree.capacity(); }
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
@@ -377,8 +377,8 @@
//!
//! <b>Note</b>: If capacity() is less than "count", iterators and references to
//! to values might be invalidated.
- void reserve(size_type count)
- { m_flat_tree.reserve(count); }
+ void reserve(size_type count_)
+ { m_flat_tree.reserve(count_); }
//! <b>Effects</b>: Tries to deallocate the excess of memory created
// with previous allocations. The size of the vector is unchanged
@@ -1045,7 +1045,7 @@
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
- size_type capacity() const
+ size_type capacity() const
{ return m_flat_tree.capacity(); }
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
@@ -1057,8 +1057,8 @@
//!
//! <b>Note</b>: If capacity() is less than "count", iterators and references to
//! to values might be invalidated.
- void reserve(size_type count)
- { m_flat_tree.reserve(count); }
+ void reserve(size_type count_)
+ { m_flat_tree.reserve(count_); }
//! <b>Effects</b>: Tries to deallocate the excess of memory created
// with previous allocations. The size of the vector is unchanged
Modified: branches/release/boost/container/map.hpp
==============================================================================
--- branches/release/boost/container/map.hpp (original)
+++ branches/release/boost/container/map.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -951,9 +951,9 @@
//!
//! <b>Complexity</b>: Linear in N.
template <class InputIterator>
- multimap(ordered_range_t ordered_range, InputIterator first, InputIterator last, const Compare& comp = Compare(),
+ multimap(ordered_range_t ordered_range_, InputIterator first, InputIterator last, const Compare& comp = Compare(),
const allocator_type& a = allocator_type())
- : m_tree(ordered_range, first, last, comp, a)
+ : m_tree(ordered_range_, first, last, comp, a)
{}
//! <b>Effects</b>: Copy constructs a multimap.
Modified: branches/release/boost/container/set.hpp
==============================================================================
--- branches/release/boost/container/set.hpp (original)
+++ branches/release/boost/container/set.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -757,10 +757,10 @@
//!
//! <b>Complexity</b>: Linear in N.
template <class InputIterator>
- multiset( ordered_range_t ordered_range, InputIterator first, InputIterator last
+ multiset( ordered_range_t ordered_range_, InputIterator first, InputIterator last
, const Compare& comp = Compare()
, const allocator_type& a = allocator_type())
- : m_tree(ordered_range, first, last, comp, a)
+ : m_tree(ordered_range_, first, last, comp, a)
{}
//! <b>Effects</b>: Copy constructs a multiset.
Modified: branches/release/boost/container/stable_vector.hpp
==============================================================================
--- branches/release/boost/container/stable_vector.hpp (original)
+++ branches/release/boost/container/stable_vector.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -1094,7 +1094,7 @@
if(n > this->max_size())
throw std::bad_alloc();
- size_type size = this->size();
+ size_type size_ = this->size();
size_type old_capacity = this->capacity();
if(n > old_capacity){
index_traits_type::initialize_end_node(this->index, this->internal_data.end_node, n);
@@ -1106,8 +1106,8 @@
index_traits_type::fix_up_pointers_from(this->index, this->index.begin());
}
//Now fill pool if data is not enough
- if((n - size) > this->internal_data.pool_size){
- this->priv_increase_pool((n - size) - this->internal_data.pool_size);
+ if((n - size_) > this->internal_data.pool_size){
+ this->priv_increase_pool((n - size_) - this->internal_data.pool_size);
}
}
}
Modified: branches/release/boost/container/string.hpp
==============================================================================
--- branches/release/boost/container/string.hpp (original)
+++ branches/release/boost/container/string.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -1322,10 +1322,10 @@
//! <b>Returns</b>: *this
basic_string& insert(size_type pos, const basic_string& s)
{
- const size_type size = this->size();
- if (pos > size)
+ const size_type size_ = this->size();
+ if (pos > size_)
this->throw_out_of_range();
- if (size > this->max_size() - s.size())
+ if (size_ > this->max_size() - s.size())
this->throw_length_error();
this->insert(this->priv_addr() + pos, s.begin(), s.end());
return *this;
@@ -1341,12 +1341,12 @@
//! <b>Returns</b>: *this
basic_string& insert(size_type pos1, const basic_string& s, size_type pos2, size_type n)
{
- const size_type size = this->size();
+ const size_type size_ = this->size();
const size_type str_size = s.size();
- if (pos1 > size || pos2 > str_size)
+ if (pos1 > size_ || pos2 > str_size)
this->throw_out_of_range();
size_type len = container_detail::min_value(n, str_size - pos2);
- if (size > this->max_size() - len)
+ if (size_ > this->max_size() - len)
this->throw_length_error();
const CharT *beg_ptr = container_detail::to_raw_pointer(s.begin()) + pos2;
const CharT *end_ptr = beg_ptr + len;
@@ -1949,12 +1949,12 @@
//! <b>Returns</b>: find(basic_string<CharT,traits,Allocator>(1,c), pos).
size_type find(CharT c, size_type pos = 0) const
{
- const size_type size = this->size();
- if (pos >= size)
+ const size_type size_ = this->size();
+ if (pos >= size_)
return npos;
else {
- const pointer addr = this->priv_addr();
- pointer finish = addr + size;
+ const pointer addr = this->priv_addr();
+ pointer finish = addr + size_;
const const_iterator result =
std::find_if(addr + pos, finish,
std::bind2nd(Eq_traits<Traits>(), c));
@@ -2039,12 +2039,12 @@
//! <b>Returns</b>: find_first_of(basic_string(s, n), pos).
size_type find_first_of(const CharT* s, size_type pos, size_type n) const
{
- const size_type size = this->size();
- if (pos >= size)
+ const size_type size_ = this->size();
+ if (pos >= size_)
return npos;
else {
- const pointer addr = this->priv_addr();
- pointer finish = addr + size;
+ const pointer addr = this->priv_addr();
+ pointer finish = addr + size_;
const_iterator result = std::find_first_of
(addr + pos, finish, s, s + n, Eq_traits<Traits>());
return result != finish ? result - this->begin() : npos;
Modified: branches/release/boost/intrusive/avltree.hpp
==============================================================================
--- branches/release/boost/intrusive/avltree.hpp (original)
+++ branches/release/boost/intrusive/avltree.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -542,9 +542,9 @@
template<class Iterator>
void insert_equal(Iterator b, Iterator e)
{
- iterator end(this->end());
+ iterator end_(this->end());
for (; b != e; ++b)
- this->insert_equal(end, *b);
+ this->insert_equal(end_, *b);
}
//! <b>Requires</b>: value must be an lvalue
@@ -608,9 +608,9 @@
void insert_unique(Iterator b, Iterator e)
{
if(this->empty()){
- iterator end(this->end());
+ iterator end_(this->end());
for (; b != e; ++b)
- this->insert_unique(end, *b);
+ this->insert_unique(end_, *b);
}
else{
for (; b != e; ++b)
@@ -1249,7 +1249,7 @@
//! <b>Requires</b>: KeyValueCompare is a function object that induces a strict weak
//! ordering compatible with the strict weak ordering used to create the
- //! the tree.
+ //! the tree.
//! 'lower_key' must not be greater than 'upper_key' according to 'comp'. If
//! 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be false.
//!
@@ -1298,7 +1298,7 @@
//! <b>Requires</b>: KeyValueCompare is a function object that induces a strict weak
//! ordering compatible with the strict weak ordering used to create the
- //! the tree.
+ //! the tree.
//! 'lower_key' must not be greater than 'upper_key' according to 'comp'. If
//! 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be false.
//!
Modified: branches/release/boost/intrusive/hashtable.hpp
==============================================================================
--- branches/release/boost/intrusive/hashtable.hpp (original)
+++ branches/release/boost/intrusive/hashtable.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -424,20 +424,20 @@
{
node_ptr nxt_ptr(node_traits::get_next(to_erase_ptr));
node_ptr prev_in_group_ptr(group_traits::get_next(to_erase_ptr));
- bool last_in_group = (end_ptr == nxt_ptr) ||
+ bool last_in_group_bool = (end_ptr == nxt_ptr) ||
(group_traits::get_next(nxt_ptr) != to_erase_ptr);
- bool first_in_group = node_traits::get_next(prev_in_group_ptr) != to_erase_ptr;
+ bool first_in_group_bool = node_traits::get_next(prev_in_group_ptr) != to_erase_ptr;
- if(first_in_group && last_in_group){
+ if(first_in_group_bool && last_in_group_bool){
group_algorithms::init(to_erase_ptr);
}
- else if(first_in_group){
+ else if(first_in_group_bool){
group_algorithms::unlink_after(nxt_ptr);
}
- else if(last_in_group){
- node_ptr first_in_group =
+ else if(last_in_group_bool){
+ node_ptr first_in_group_ptr =
get_first_in_group_of_last_in_group(to_erase_ptr);
- group_algorithms::unlink_after(first_in_group);
+ group_algorithms::unlink_after(first_in_group_ptr);
}
else{
group_algorithms::unlink_after(nxt_ptr);
@@ -896,12 +896,12 @@
{
this->priv_initialize_buckets();
this->priv_size_traits().set_size(size_type(0));
- size_type bucket_size = this->priv_bucket_count();
- BOOST_INTRUSIVE_INVARIANT_ASSERT(bucket_size != 0);
+ size_type bucket_size_ = this->priv_bucket_count();
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(bucket_size_ != 0);
//Check power of two bucket array if the option is activated
BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (bucket_size & (bucket_size-1))));
- this->priv_split_traits().set_size(bucket_size>>1);
+ (!power_2_buckets || (0 == (bucket_size_ & (bucket_size_-1))));
+ this->priv_split_traits().set_size(bucket_size_>>1);
}
//! <b>Effects</b>: to-do
@@ -1026,9 +1026,9 @@
return this->begin() == this->end();
}
else{
- size_type bucket_count = this->priv_bucket_count();
+ size_type bucket_count_ = this->priv_bucket_count();
const bucket_type *b = boost::intrusive::detail::to_raw_pointer(this->priv_bucket_pointer());
- for (size_type n = 0; n < bucket_count; ++n, ++b){
+ for (size_type n = 0; n < bucket_count_; ++n, ++b){
if(!b->empty()){
return false;
}
@@ -1049,9 +1049,9 @@
return this->priv_size_traits().get_size();
else{
size_type len = 0;
- size_type bucket_count = this->priv_bucket_count();
+ size_type bucket_count_ = this->priv_bucket_count();
const bucket_type *b = boost::intrusive::detail::to_raw_pointer(this->priv_bucket_pointer());
- for (size_type n = 0; n < bucket_count; ++n, ++b){
+ for (size_type n = 0; n < bucket_count_; ++n, ++b){
len += b->size();
}
return len;
@@ -1468,9 +1468,9 @@
siterator first_local_it(b.slist_it());
size_type first_bucket_num = this->priv_get_bucket_num(first_local_it);
- const bucket_ptr bucket_pointer = this->priv_bucket_pointer();
+ const bucket_ptr bucket_pointer_ = this->priv_bucket_pointer();
siterator before_first_local_it
- = this->priv_get_previous(bucket_pointer[first_bucket_num], first_local_it);
+ = this->priv_get_previous(bucket_pointer_[first_bucket_num], first_local_it);
size_type last_bucket_num;
siterator last_local_it;
@@ -1478,7 +1478,7 @@
//of the last bucket
if(e == this->end()){
last_bucket_num = this->bucket_count() - 1;
- last_local_it = bucket_pointer[last_bucket_num].end();
+ last_local_it = bucket_pointer_[last_bucket_num].end();
}
else{
last_local_it = e.slist_it();
@@ -1533,7 +1533,7 @@
siterator it =
this->priv_find(key, hash_func, equal_func, bucket_num, h, prev);
bool success = it != this->priv_invalid_local_it();
- size_type count(0);
+ size_type count_(0);
if(!success){
return 0;
}
@@ -1541,12 +1541,12 @@
siterator last = bucket_type::s_iterator_to
(*node_traits::get_next(group_functions_t::get_last_in_group
(hashtable_impl::dcast_bucket_ptr(it.pointed_node()), optimize_multikey_t())));
- this->priv_erase_range_impl(bucket_num, prev, last, disposer, count);
+ this->priv_erase_range_impl(bucket_num, prev, last, disposer, count_);
}
else{
//If found erase all equal values
bucket_type &b = this->priv_bucket_pointer()[bucket_num];
- for(siterator end = b.end(); it != end; ++count, ++it){
+ for(siterator end_ = b.end(); it != end_; ++count_, ++it){
slist_node_ptr n(it.pointed_node());
const value_type &v = this->priv_value_from_slist_node(n);
if(compare_hash){
@@ -1563,7 +1563,7 @@
b.erase_after_and_dispose(prev, it, make_node_disposer(disposer));
}
this->priv_erasure_update_cache();
- return count;
+ return count_;
}
//! <b>Effects</b>: Erases all of the elements.
@@ -1630,9 +1630,9 @@
template<class KeyType, class KeyHasher, class KeyValueEqual>
size_type count(const KeyType &key, const KeyHasher &hash_func, const KeyValueEqual &equal_func) const
{
- size_type bucket_n1, bucket_n2, count;
- this->priv_equal_range(key, hash_func, equal_func, bucket_n1, bucket_n2, count);
- return count;
+ size_type bucket_n1, bucket_n2, count_;
+ this->priv_equal_range(key, hash_func, equal_func, bucket_n1, bucket_n2, count_);
+ return count_;
}
//! <b>Effects</b>: Finds an iterator to the first element is equal to
@@ -1746,9 +1746,9 @@
std::pair<iterator,iterator> equal_range
(const KeyType &key, KeyHasher hash_func, KeyValueEqual equal_func)
{
- size_type bucket_n1, bucket_n2, count;
+ size_type bucket_n1, bucket_n2, count_;
std::pair<siterator, siterator> ret = this->priv_equal_range
- (key, hash_func, equal_func, bucket_n1, bucket_n2, count);
+ (key, hash_func, equal_func, bucket_n1, bucket_n2, count_);
return std::pair<iterator, iterator>
(iterator(ret.first, this), iterator(ret.second, this));
}
@@ -1788,9 +1788,9 @@
std::pair<const_iterator,const_iterator> equal_range
(const KeyType &key, KeyHasher hash_func, KeyValueEqual equal_func) const
{
- size_type bucket_n1, bucket_n2, count;
+ size_type bucket_n1, bucket_n2, count_;
std::pair<siterator, siterator> ret =
- this->priv_equal_range(key, hash_func, equal_func, bucket_n1, bucket_n2, count);
+ this->priv_equal_range(key, hash_func, equal_func, bucket_n1, bucket_n2, count_);
return std::pair<const_iterator, const_iterator>
(const_iterator(ret.first, this), const_iterator(ret.second, this));
}
@@ -2102,9 +2102,9 @@
if(!fast_shrink){
siterator before_i(old_bucket.before_begin());
- siterator end(old_bucket.end());
+ siterator end_(old_bucket.end());
siterator i(old_bucket.begin());
- for(;i != end; ++i){
+ for(;i != end_; ++i){
const value_type &v = this->priv_value_from_slist_node(i.pointed_node());
const std::size_t hash_value = this->priv_stored_or_compute_hash(v, store_hash_t());
const size_type new_n = this->priv_hash_to_bucket(hash_value, new_bucket_count, new_bucket_count);
@@ -2159,19 +2159,19 @@
{
//This function is only available for containers with incremental hashing
BOOST_STATIC_ASSERT(( incremental && power_2_buckets ));
- const size_type split_idx = this->priv_split_traits().get_size();
- const size_type bucket_count = this->priv_bucket_count();
- const bucket_ptr bucket_pointer = this->priv_bucket_pointer();
+ const size_type split_idx = this->priv_split_traits().get_size();
+ const size_type bucket_count_ = this->priv_bucket_count();
+ const bucket_ptr bucket_pointer_ = this->priv_bucket_pointer();
if(grow){
//Test if the split variable can be changed
- if(split_idx >= bucket_count)
+ if(split_idx >= bucket_count_)
return false;
- const size_type bucket_to_rehash = split_idx - bucket_count/2;
- bucket_type &old_bucket = bucket_pointer[bucket_to_rehash];
+ const size_type bucket_to_rehash = split_idx - bucket_count_/2;
+ bucket_type &old_bucket = bucket_pointer_[bucket_to_rehash];
siterator before_i(old_bucket.before_begin());
- const siterator end(old_bucket.end());
+ const siterator end_(old_bucket.end());
siterator i(old_bucket.begin());
this->priv_split_traits().increment();
@@ -2179,8 +2179,8 @@
//moving elements from old_bucket to the target bucket, all moved
//elements are moved back to the original one.
detail::incremental_rehash_rollback<bucket_type, split_traits> rollback
- ( bucket_pointer[split_idx], old_bucket, this->priv_split_traits());
- for(;i != end; ++i){
+ ( bucket_pointer_[split_idx], old_bucket, this->priv_split_traits());
+ for(;i != end_; ++i){
const value_type &v = this->priv_value_from_slist_node(i.pointed_node());
const std::size_t hash_value = this->priv_stored_or_compute_hash(v, store_hash_t());
const size_type new_n = this->priv_hash_to_bucket(hash_value);
@@ -2191,7 +2191,7 @@
before_i = last;
}
else{
- bucket_type &new_b = bucket_pointer[new_n];
+ bucket_type &new_b = bucket_pointer_[new_n];
new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last);
}
i = before_i;
@@ -2202,11 +2202,11 @@
}
else{
//Test if the split variable can be changed
- if(split_idx <= bucket_count/2)
+ if(split_idx <= bucket_count_/2)
return false;
- const size_type target_bucket_num = split_idx - 1 - bucket_count/2;
- bucket_type &target_bucket = bucket_pointer[target_bucket_num];
- bucket_type &source_bucket = bucket_pointer[split_idx-1];
+ const size_type target_bucket_num = split_idx - 1 - bucket_count_/2;
+ bucket_type &target_bucket = bucket_pointer_[target_bucket_num];
+ bucket_type &source_bucket = bucket_pointer_[split_idx-1];
target_bucket.splice_after(target_bucket.cbefore_begin(), source_bucket);
this->priv_split_traits().decrement();
this->priv_insertion_update_cache(target_bucket_num);
@@ -2324,12 +2324,12 @@
std::size_t priv_hash_to_bucket(std::size_t hash_value) const
{ return this->priv_hash_to_bucket(hash_value, this->priv_real_bucket_traits().bucket_count(), this->priv_split_traits().get_size()); }
- std::size_t priv_hash_to_bucket(std::size_t hash_value, std::size_t bucket_count, std::size_t split) const
+ std::size_t priv_hash_to_bucket(std::size_t hash_value, std::size_t bucket_count_, std::size_t split) const
{
- std::size_t bucket_number = hashtable_impl::priv_hash_to_bucket_impl(hash_value, bucket_count, power_2_buckets_t());
+ std::size_t bucket_number = hashtable_impl::priv_hash_to_bucket_impl(hash_value, bucket_count_, power_2_buckets_t());
if(incremental)
if(bucket_number >= split)
- bucket_number -= bucket_count/2;
+ bucket_number -= bucket_count_/2;
return bucket_number;
}
@@ -2413,20 +2413,20 @@
template<class Disposer>
void priv_erase_range_impl
- (size_type bucket_num, siterator before_first_it, siterator end, Disposer disposer, size_type &num_erased)
+ (size_type bucket_num, siterator before_first_it, siterator end_, Disposer disposer, size_type &num_erased)
{
const bucket_ptr buckets = this->priv_bucket_pointer();
bucket_type &b = buckets[bucket_num];
- if(before_first_it == b.before_begin() && end == b.end()){
+ if(before_first_it == b.before_begin() && end_ == b.end()){
this->priv_erase_range_impl(bucket_num, 1, disposer, num_erased);
}
else{
num_erased = 0;
siterator to_erase(before_first_it);
++to_erase;
- slist_node_ptr end_ptr = end.pointed_node();
- while(to_erase != end){
+ slist_node_ptr end_ptr = end_.pointed_node();
+ while(to_erase != end_){
group_functions_t::erase_from_group(end_ptr, hashtable_impl::dcast_bucket_ptr(to_erase.pointed_node()), optimize_multikey_t());
to_erase = b.erase_after_and_dispose(before_first_it, make_node_disposer(disposer));
++num_erased;
@@ -2447,8 +2447,8 @@
siterator b_begin(b.before_begin());
siterator nxt(b_begin);
++nxt;
- siterator end(b.end());
- while(nxt != end){
+ siterator end_(b.end());
+ while(nxt != end_){
group_functions_t::init_group(hashtable_impl::dcast_bucket_ptr(nxt.pointed_node()), optimize_multikey_t());
nxt = b.erase_after_and_dispose
(b_begin, make_node_disposer(disposer));
@@ -2648,8 +2648,8 @@
siterator priv_begin(detail::false_) const
{
size_type n = 0;
- size_type bucket_count = this->priv_bucket_count();
- for (n = 0; n < bucket_count; ++n){
+ size_type bucket_count_ = this->priv_bucket_count();
+ for (n = 0; n < bucket_count_; ++n){
bucket_type &b = this->priv_bucket_pointer()[n];
if(!b.empty()){
return b.begin();
@@ -2772,9 +2772,9 @@
void priv_initialize_buckets()
{ this->priv_clear_buckets(this->priv_bucket_pointer(), this->priv_bucket_count()); }
- void priv_clear_buckets(bucket_ptr buckets_ptr, size_type bucket_count)
+ void priv_clear_buckets(bucket_ptr buckets_ptr, size_type bucket_count_)
{
- for(; bucket_count--; ++buckets_ptr){
+ for(; bucket_count_--; ++buckets_ptr){
if(safemode_or_autounlink){
hashtable_impl::priv_clear_group_nodes(*buckets_ptr, optimize_multikey_t());
buckets_ptr->clear_and_dispose(detail::init_disposer<node_algorithms>());
@@ -2877,10 +2877,10 @@
, KeyValueEqual equal_func
, size_type &bucket_number_first
, size_type &bucket_number_second
- , size_type &count) const
+ , size_type &count_) const
{
std::size_t h;
- count = 0;
+ count_ = 0;
siterator prev;
//Let's see if the element is present
std::pair<siterator, siterator> to_return
@@ -2892,39 +2892,41 @@
}
//If it's present, find the first that it's not equal in
//the same bucket
- bucket_type &b = this->priv_bucket_pointer()[bucket_number_first];
- siterator it = to_return.first;
- if(optimize_multikey){
- to_return.second = bucket_type::s_iterator_to
- (*node_traits::get_next(group_functions_t::get_last_in_group
- (hashtable_impl::dcast_bucket_ptr(it.pointed_node()), optimize_multikey_t())));
- count = std::distance(it, to_return.second);
- if(to_return.second != b.end()){
- bucket_number_second = bucket_number_first;
- return to_return;
- }
- }
- else{
- ++count;
- ++it;
- while(it != b.end()){
- const value_type &v = this->priv_value_from_slist_node(it.pointed_node());
- if(compare_hash){
- std::size_t hv = this->priv_stored_or_compute_hash(v, store_hash_t());
- if(hv != h || !equal_func(key, v)){
- to_return.second = it;
- bucket_number_second = bucket_number_first;
- return to_return;
- }
- }
- else if(!equal_func(key, v)){
- to_return.second = it;
- bucket_number_second = bucket_number_first;
- return to_return;
- }
- ++it;
- ++count;
- }
+ {
+ bucket_type &b = this->priv_bucket_pointer()[bucket_number_first];
+ siterator it = to_return.first;
+ if(optimize_multikey){
+ to_return.second = bucket_type::s_iterator_to
+ (*node_traits::get_next(group_functions_t::get_last_in_group
+ (hashtable_impl::dcast_bucket_ptr(it.pointed_node()), optimize_multikey_t())));
+ count_ = std::distance(it, to_return.second);
+ if(to_return.second != b.end()){
+ bucket_number_second = bucket_number_first;
+ return to_return;
+ }
+ }
+ else{
+ ++count_;
+ ++it;
+ while(it != b.end()){
+ const value_type &v = this->priv_value_from_slist_node(it.pointed_node());
+ if(compare_hash){
+ std::size_t hv = this->priv_stored_or_compute_hash(v, store_hash_t());
+ if(hv != h || !equal_func(key, v)){
+ to_return.second = it;
+ bucket_number_second = bucket_number_first;
+ return to_return;
+ }
+ }
+ else if(!equal_func(key, v)){
+ to_return.second = it;
+ bucket_number_second = bucket_number_first;
+ return to_return;
+ }
+ ++it;
+ ++count_;
+ }
+ }
}
//If we reached the end, find the first, non-empty bucket
Modified: branches/release/boost/intrusive/list.hpp
==============================================================================
--- branches/release/boost/intrusive/list.hpp (original)
+++ branches/release/boost/intrusive/list.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -928,12 +928,12 @@
//!
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
//! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, list_impl&x, const_iterator start, const_iterator end)
+ void splice(const_iterator p, list_impl&x, const_iterator start, const_iterator end_)
{
if(constant_time_size)
- this->splice(p, x, start, end, std::distance(start, end));
+ this->splice(p, x, start, end_, std::distance(start, end_));
else
- this->splice(p, x, start, end, 1);//distance is a dummy value
+ this->splice(p, x, start, end_, 1);//distance is a dummy value
}
//! <b>Requires</b>: p must be a valid iterator of *this.
@@ -949,19 +949,19 @@
//!
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
//! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, list_impl&x, const_iterator start, const_iterator end, difference_type n)
+ void splice(const_iterator p, list_impl&x, const_iterator start, const_iterator end_, difference_type n)
{
if(n){
if(constant_time_size){
size_traits &thist = this->priv_size_traits();
size_traits &xt = x.priv_size_traits();
- BOOST_INTRUSIVE_INVARIANT_ASSERT(n == std::distance(start, end));
- node_algorithms::transfer(p.pointed_node(), start.pointed_node(), end.pointed_node());
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(n == std::distance(start, end_));
+ node_algorithms::transfer(p.pointed_node(), start.pointed_node(), end_.pointed_node());
thist.set_size(thist.get_size() + n);
xt.set_size(xt.get_size() - n);
}
else{
- node_algorithms::transfer(p.pointed_node(), start.pointed_node(), end.pointed_node());
+ node_algorithms::transfer(p.pointed_node(), start.pointed_node(), end_.pointed_node());
}
}
}
Modified: branches/release/boost/intrusive/sgtree.hpp
==============================================================================
--- branches/release/boost/intrusive/sgtree.hpp (original)
+++ branches/release/boost/intrusive/sgtree.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -701,9 +701,9 @@
template<class Iterator>
void insert_equal(Iterator b, Iterator e)
{
- iterator end(this->end());
+ iterator end_(this->end());
for (; b != e; ++b)
- this->insert_equal(end, *b);
+ this->insert_equal(end_, *b);
}
//! <b>Requires</b>: value must be an lvalue
@@ -767,9 +767,9 @@
void insert_unique(Iterator b, Iterator e)
{
if(this->empty()){
- iterator end(this->end());
+ iterator end_(this->end());
for (; b != e; ++b)
- this->insert_unique(end, *b);
+ this->insert_unique(end_, *b);
}
else{
for (; b != e; ++b)
Modified: branches/release/boost/intrusive/slist.hpp
==============================================================================
--- branches/release/boost/intrusive/slist.hpp (original)
+++ branches/release/boost/intrusive/slist.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -758,9 +758,9 @@
//!
//! <b>Note</b>: Does not affect the validity of iterators and references.
template<class Iterator>
- void insert_after(const_iterator prev_p, Iterator first, Iterator last)
+ void insert_after(const_iterator prev_p, Iterator first, Iterator last_)
{
- for (; first != last; ++first)
+ for (; first != last_; ++first)
prev_p = this->insert_after(prev_p, *first);
}
@@ -825,21 +825,21 @@
//!
//! <b>Note</b>: Invalidates the iterators (but not the references) to the
//! erased element.
- iterator erase_after(const_iterator before_first, const_iterator last)
+ iterator erase_after(const_iterator before_first, const_iterator last_)
{
if(safemode_or_autounlink || constant_time_size){
- return this->erase_after_and_dispose(before_first, last, detail::null_disposer());
+ return this->erase_after_and_dispose(before_first, last_, detail::null_disposer());
}
else{
node_ptr bfp = before_first.pointed_node();
- node_ptr lp = last.pointed_node();
+ node_ptr lp = last_.pointed_node();
if(cache_last){
if(lp == this->get_end_node()){
this->set_last_node(bfp);
}
}
node_algorithms::unlink_after(bfp, lp);
- return last.unconst();
+ return last_.unconst();
}
}
@@ -857,15 +857,15 @@
//!
//! <b>Note</b>: Invalidates the iterators (but not the references) to the
//! erased element.
- iterator erase_after(const_iterator before_first, const_iterator last, difference_type n)
+ iterator erase_after(const_iterator before_first, const_iterator last_, difference_type n)
{
- BOOST_INTRUSIVE_INVARIANT_ASSERT(std::distance(++const_iterator(before_first), last) == difference_type(n));
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(std::distance(++const_iterator(before_first), last_) == difference_type(n));
if(safemode_or_autounlink){
- return this->erase_after(before_first, last);
+ return this->erase_after(before_first, last_);
}
else{
node_ptr bfp = before_first.pointed_node();
- node_ptr lp = last.pointed_node();
+ node_ptr lp = last_.pointed_node();
if(cache_last){
if((lp == this->get_end_node())){
this->set_last_node(bfp);
@@ -875,7 +875,7 @@
if(constant_time_size){
this->priv_size_traits().set_size(this->priv_size_traits().get_size() - n);
}
- return last.unconst();
+ return last_.unconst();
}
}
@@ -908,8 +908,8 @@
//!
//! <b>Note</b>: Invalidates the iterators (but not the references) to the
//! erased elements.
- iterator erase(const_iterator first, const_iterator last)
- { return this->erase_after(this->previous(first), last); }
+ iterator erase(const_iterator first, const_iterator last_)
+ { return this->erase_after(this->previous(first), last_); }
//! <b>Effects</b>: Erases the range [first, last) from
//! the list. n must be std::distance(first, last).
@@ -925,8 +925,8 @@
//!
//! <b>Note</b>: Invalidates the iterators (but not the references) to the
//! erased element.
- iterator erase(const_iterator first, const_iterator last, difference_type n)
- { return this->erase_after(this->previous(first), last, n); }
+ iterator erase(const_iterator first, const_iterator last_, difference_type n)
+ { return this->erase_after(this->previous(first), last_, n); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -999,9 +999,9 @@
//!
//! <b>Note</b>: Invalidates the iterators to the erased element.
template<class Disposer>
- iterator erase_after_and_dispose(const_iterator before_first, const_iterator last, Disposer disposer)
+ iterator erase_after_and_dispose(const_iterator before_first, const_iterator last_, Disposer disposer)
{
- node_ptr bfp(before_first.pointed_node()), lp(last.pointed_node());
+ node_ptr bfp(before_first.pointed_node()), lp(last_.pointed_node());
node_ptr fp(node_traits::get_next(bfp));
node_algorithms::unlink_after(bfp, lp);
while(fp != lp){
@@ -1015,7 +1015,7 @@
if(cache_last && (node_traits::get_next(bfp) == this->get_end_node())){
this->set_last_node(bfp);
}
- return last.unconst();
+ return last_.unconst();
}
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
@@ -1061,8 +1061,8 @@
//! <b>Note</b>: Invalidates the iterators (but not the references) to the
//! erased elements.
template<class Disposer>
- iterator erase_and_dispose(const_iterator first, const_iterator last, Disposer disposer)
- { return this->erase_after_and_dispose(this->previous(first), last, disposer); }
+ iterator erase_and_dispose(const_iterator first, const_iterator last_, Disposer disposer)
+ { return this->erase_after_and_dispose(this->previous(first), last_, disposer); }
//! <b>Requires</b>: Dereferencing iterator must yield
//! an lvalue of type value_type.
@@ -1130,14 +1130,14 @@
//! assigned to the last spliced element or prev if x is empty.
//! This iterator can be used as new "prev" iterator for a new splice_after call.
//! that will splice new values after the previously spliced values.
- void splice_after(const_iterator prev, slist_impl &x, const_iterator *last = 0)
+ void splice_after(const_iterator prev, slist_impl &x, const_iterator *last_ = 0)
{
if(x.empty()){
- if(last) *last = prev;
+ if(last_) *last_ = prev;
}
else if(linear && this->empty()){
this->swap(x);
- if(last) *last = this->previous(this->cend());
+ if(last_) *last_ = this->previous(this->cend());
}
else{
const_iterator last_x(x.previous(x.end())); //<- constant time if cache_last is active
@@ -1152,7 +1152,7 @@
node_algorithms::transfer_after( prev_n, x.before_begin().pointed_node(), last_x_n);
this->priv_size_traits().set_size(this->priv_size_traits().get_size() + x.priv_size_traits().get_size());
x.priv_size_traits().set_size(size_type(0));
- if(last) *last = last_x;
+ if(last_) *last_ = last_x;
}
}
@@ -1247,8 +1247,8 @@
//! assigned to the last spliced element or prev if x is empty.
//! This iterator can be used as new "prev" iterator for a new splice_after call.
//! that will splice new values after the previously spliced values.
- void splice(const_iterator it, slist_impl &x, const_iterator *last = 0)
- { this->splice_after(this->previous(it), x, last); }
+ void splice(const_iterator it, slist_impl &x, const_iterator *last_ = 0)
+ { this->splice_after(this->previous(it), x, last_); }
//! <b>Requires</b>: it p must be a valid iterator of *this.
//! elem must point to an element contained in list
@@ -1284,8 +1284,8 @@
//!
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
//! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator pos, slist_impl &x, const_iterator first, const_iterator last)
- { return this->splice_after(this->previous(pos), x, x.previous(first), x.previous(last)); }
+ void splice(const_iterator pos, slist_impl &x, const_iterator first, const_iterator last_)
+ { return this->splice_after(this->previous(pos), x, x.previous(first), x.previous(last_)); }
//! <b>Requires</b>: pos must be a dereferenceable iterator in *this
//! and first and last belong to x and first and last a valid range on x.
@@ -1303,8 +1303,8 @@
//!
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
//! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator pos, slist_impl &x, const_iterator first, const_iterator last, difference_type n)
- { return this->splice_after(this->previous(pos), x, x.previous(first), x.previous(last), n); }
+ void splice(const_iterator pos, slist_impl &x, const_iterator first, const_iterator last_, difference_type n)
+ { return this->splice_after(this->previous(pos), x, x.previous(first), x.previous(last_), n); }
//! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
//! The sort is stable, that is, the relative order of equivalent elements is preserved.
@@ -1405,11 +1405,11 @@
//! <b>Additional note</b>: If optional "last" argument is passed, it is assigned
//! to an iterator to the last transferred value or end() is x is empty.
template<class Predicate>
- void merge(slist_impl& x, Predicate p, const_iterator *last = 0)
+ void merge(slist_impl& x, Predicate p, const_iterator *last_ = 0)
{
const_iterator e(this->cend()), ex(x.cend()), bb(this->cbefore_begin()),
bb_next;
- if(last) *last = e.unconst();
+ if(last_) *last_ = e.unconst();
while(!x.empty()){
const_iterator ibx_next(x.cbefore_begin()), ibx(ibx_next++);
while (++(bb_next = bb) != e && !p(*ibx_next, *bb_next)){
@@ -1417,7 +1417,7 @@
}
if(bb_next == e){
//Now transfer the rest to the end of the container
- this->splice_after(bb, x, last);
+ this->splice_after(bb, x, last_);
break;
}
else{
@@ -1426,7 +1426,7 @@
ibx = ibx_next; ++n;
} while(++(ibx_next = ibx) != ex && p(*ibx_next, *bb_next));
this->splice_after(bb, x, x.before_begin(), ibx, n);
- if(last) *last = ibx;
+ if(last_) *last_ = ibx;
}
}
}
@@ -1816,9 +1816,9 @@
void priv_shift_backwards(size_type n, detail::bool_<false>)
{
- node_ptr last = node_algorithms::move_forward(this->get_root_node(), (std::size_t)n);
- if(cache_last && last){
- this->set_last_node(last);
+ node_ptr last_ = node_algorithms::move_forward(this->get_root_node(), (std::size_t)n);
+ if(cache_last && last_){
+ this->set_last_node(last_);
}
}
@@ -1837,9 +1837,9 @@
void priv_shift_forward(size_type n, detail::bool_<false>)
{
- node_ptr last = node_algorithms::move_backwards(this->get_root_node(), (std::size_t)n);
- if(cache_last && last){
- this->set_last_node(last);
+ node_ptr last_ = node_algorithms::move_backwards(this->get_root_node(), (std::size_t)n);
+ if(cache_last && last_){
+ this->set_last_node(last_);
}
}
Modified: branches/release/boost/intrusive/splaytree.hpp
==============================================================================
--- branches/release/boost/intrusive/splaytree.hpp (original)
+++ branches/release/boost/intrusive/splaytree.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -540,9 +540,9 @@
void insert_equal(Iterator b, Iterator e)
{
if(this->empty()){
- iterator end(this->end());
+ iterator end_(this->end());
for (; b != e; ++b)
- this->insert_equal(end, *b);
+ this->insert_equal(end_, *b);
}
}
Modified: branches/release/boost/intrusive/treap.hpp
==============================================================================
--- branches/release/boost/intrusive/treap.hpp (original)
+++ branches/release/boost/intrusive/treap.hpp 2012-10-25 22:55:57 EDT (Thu, 25 Oct 2012)
@@ -627,9 +627,9 @@
template<class Iterator>
void insert_equal(Iterator b, Iterator e)
{
- iterator end(this->end());
+ iterator end_(this->end());
for (; b != e; ++b)
- this->insert_equal(end, *b);
+ this->insert_equal(end_, *b);
}
//! <b>Requires</b>: value must be an lvalue
@@ -696,9 +696,9 @@
void insert_unique(Iterator b, Iterator e)
{
if(this->empty()){
- iterator end(this->end());
+ iterator end_(this->end());
for (; b != e; ++b)
- this->insert_unique(end, *b);
+ this->insert_unique(end_, *b);
}
else{
for (; b != e; ++b)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk