Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82897 - in trunk: boost/multi_index boost/multi_index/detail libs/multi_index/doc
From: joaquin_at_[hidden]
Date: 2013-02-15 01:51:49


Author: joaquin
Date: 2013-02-15 01:51:48 EST (Fri, 15 Feb 2013)
New Revision: 82897
URL: http://svn.boost.org/trac/boost/changeset/82897

Log:
fixed #8034
Text files modified:
   trunk/boost/multi_index/detail/index_matcher.hpp | 10 +++---
   trunk/boost/multi_index/detail/safe_mode.hpp | 12 +++---
   trunk/boost/multi_index/hashed_index.hpp | 54 +++++++++++++++++-----------------
   trunk/boost/multi_index/ordered_index.hpp | 62 ++++++++++++++++++++--------------------
   trunk/libs/multi_index/doc/release_notes.html | 15 ++++++++-
   5 files changed, 82 insertions(+), 71 deletions(-)

Modified: trunk/boost/multi_index/detail/index_matcher.hpp
==============================================================================
--- trunk/boost/multi_index/detail/index_matcher.hpp (original)
+++ trunk/boost/multi_index/detail/index_matcher.hpp 2013-02-15 01:51:48 EST (Fri, 15 Feb 2013)
@@ -1,4 +1,4 @@
-/* Copyright 2003-2008 Joaquin M Lopez Munoz.
+/* Copyright 2003-2013 Joaquin M Lopez Munoz.
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
@@ -106,14 +106,14 @@
 {
 protected:
   algorithm_base(const Allocator& al,std::size_t size):
- spc(al,size),size_(size),n(0),sorted(false)
+ spc(al,size),size_(size),n_(0),sorted(false)
   {
   }
 
   void add(void* node)
   {
- entries()[n]=entry(node,n);
- ++n;
+ entries()[n_]=entry(node,n_);
+ ++n_;
   }
 
   void begin_algorithm()const
@@ -183,7 +183,7 @@
 
   auto_space<entry,Allocator> spc;
   std::size_t size_;
- std::size_t n;
+ std::size_t n_;
   mutable bool sorted;
   mutable std::size_t num_piles;
 };

Modified: trunk/boost/multi_index/detail/safe_mode.hpp
==============================================================================
--- trunk/boost/multi_index/detail/safe_mode.hpp (original)
+++ trunk/boost/multi_index/detail/safe_mode.hpp 2013-02-15 01:51:48 EST (Fri, 15 Feb 2013)
@@ -1,4 +1,4 @@
-/* Copyright 2003-2009 Joaquin M Lopez Munoz.
+/* Copyright 2003-2013 Joaquin M Lopez Munoz.
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
@@ -142,32 +142,32 @@
 template<typename Iterator>
 inline bool check_dereferenceable_iterator(const Iterator& it)
 {
- return it.valid()&&it!=it.owner()->end()||it.unchecked();
+ return (it.valid()&&it!=it.owner()->end())||it.unchecked();
 }
 
 template<typename Iterator>
 inline bool check_incrementable_iterator(const Iterator& it)
 {
- return it.valid()&&it!=it.owner()->end()||it.unchecked();
+ return (it.valid()&&it!=it.owner()->end())||it.unchecked();
 }
 
 template<typename Iterator>
 inline bool check_decrementable_iterator(const Iterator& it)
 {
- return it.valid()&&it!=it.owner()->begin()||it.unchecked();
+ return (it.valid()&&it!=it.owner()->begin())||it.unchecked();
 }
 
 template<typename Iterator>
 inline bool check_is_owner(
   const Iterator& it,const typename Iterator::container_type& cont)
 {
- return it.valid()&&it.owner()==&cont||it.unchecked();
+ return (it.valid()&&it.owner()==&cont)||it.unchecked();
 }
 
 template<typename Iterator>
 inline bool check_same_owner(const Iterator& it0,const Iterator& it1)
 {
- return it0.valid()&&it1.valid()&&it0.owner()==it1.owner()||
+ return (it0.valid()&&it1.valid()&&it0.owner()==it1.owner())||
          it0.unchecked()||it1.unchecked();
 }
 

Modified: trunk/boost/multi_index/hashed_index.hpp
==============================================================================
--- trunk/boost/multi_index/hashed_index.hpp (original)
+++ trunk/boost/multi_index/hashed_index.hpp 2013-02-15 01:51:48 EST (Fri, 15 Feb 2013)
@@ -1,4 +1,4 @@
-/* Copyright 2003-2011 Joaquin M Lopez Munoz.
+/* Copyright 2003-2013 Joaquin M Lopez Munoz.
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
@@ -288,15 +288,15 @@
     BOOST_MULTI_INDEX_HASHED_INDEX_CHECK_INVARIANT;
 
     size_type s=0;
- std::size_t buc=buckets.position(hash(k));
+ std::size_t buc=buckets.position(hash_(k));
     node_impl_pointer x=buckets.at(buc);
     node_impl_pointer y=x->next();
     while(y!=x){
- if(eq(k,key(node_type::from_impl(y)->value()))){
+ if(eq_(k,key(node_type::from_impl(y)->value()))){
         bool b;
         do{
           node_impl_pointer z=y->next();
- b=z!=x&&eq(
+ b=z!=x&&eq_(
             key(node_type::from_impl(y)->value()),
             key(node_type::from_impl(z)->value()));
           this->final_erase_(
@@ -416,8 +416,8 @@
   /* observers */
 
   key_from_value key_extractor()const{return key;}
- hasher hash_function()const{return hash;}
- key_equal key_eq()const{return eq;}
+ hasher hash_function()const{return hash_;}
+ key_equal key_eq()const{return eq_;}
   
   /* lookup */
 
@@ -428,7 +428,7 @@
   template<typename CompatibleKey>
   iterator find(const CompatibleKey& k)const
   {
- return find(k,hash,eq);
+ return find(k,hash_,eq_);
   }
 
   template<
@@ -453,7 +453,7 @@
   template<typename CompatibleKey>
   size_type count(const CompatibleKey& k)const
   {
- return count(k,hash,eq);
+ return count(k,hash_,eq_);
   }
 
   template<
@@ -483,7 +483,7 @@
   template<typename CompatibleKey>
   std::pair<iterator,iterator> equal_range(const CompatibleKey& k)const
   {
- return equal_range(k,hash,eq);
+ return equal_range(k,hash_,eq_);
   }
 
   template<
@@ -536,7 +536,7 @@
 
   size_type bucket(key_param_type k)const
   {
- return buckets.position(hash(k));
+ return buckets.position(hash_(k));
   }
 
   local_iterator begin(size_type n)
@@ -604,8 +604,8 @@
   hashed_index(const ctor_args_list& args_list,const allocator_type& al):
     super(args_list.get_tail(),al),
     key(tuples::get<1>(args_list.get_head())),
- hash(tuples::get<2>(args_list.get_head())),
- eq(tuples::get<3>(args_list.get_head())),
+ hash_(tuples::get<2>(args_list.get_head())),
+ eq_(tuples::get<3>(args_list.get_head())),
     buckets(al,header()->impl(),tuples::get<0>(args_list.get_head())),
     mlf(1.0f),
     first_bucket(buckets.size())
@@ -622,8 +622,8 @@
 #endif
 
     key(x.key),
- hash(x.hash),
- eq(x.eq),
+ hash_(x.hash_),
+ eq_(x.eq_),
     buckets(x.get_allocator(),header()->impl(),x.buckets.size()),
     mlf(x.mlf),
     max_load(x.max_load),
@@ -762,8 +762,8 @@
     hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>& x)
   {
     std::swap(key,x.key);
- std::swap(hash,x.hash);
- std::swap(eq,x.eq);
+ std::swap(hash_,x.hash_);
+ std::swap(eq_,x.eq_);
     buckets.swap(x.buckets);
     std::swap(mlf,x.mlf);
     std::swap(max_load,x.max_load);
@@ -778,7 +778,7 @@
 
   bool replace_(value_param_type v,node_type* x)
   {
- if(eq(key(v),key(x->value()))){
+ if(eq_(key(v),key(x->value()))){
       return super::replace_(v,x);
     }
 
@@ -981,7 +981,7 @@
   {
     node_impl_pointer x=pos->next();
     while(x!=pos){
- if(eq(key(v),key(node_type::from_impl(x)->value()))){
+ if(eq_(key(v),key(node_type::from_impl(x)->value()))){
         pos=x;
         return false;
       }
@@ -996,7 +996,7 @@
     node_impl_pointer prev=pos;
     node_impl_pointer x=pos->next();
     while(x!=pos){
- if(eq(key(v),key(node_type::from_impl(x)->value()))){
+ if(eq_(key(v),key(node_type::from_impl(x)->value()))){
         pos=prev;
         return true;
       }
@@ -1064,7 +1064,7 @@
     for(;x!=x_end;++x){
       node_impl_pointer y=x->next();
       while(y!=x){
- hashes.data()[i++]=hash(key(node_type::from_impl(y)->value()));
+ hashes.data()[i++]=hash_(key(node_type::from_impl(y)->value()));
         y=y->next();
       }
     }
@@ -1103,7 +1103,7 @@
     while(y->next()!=x){
       y=y->next();
       if(y==pbuc)continue;
- if(eq(k,key(node_type::from_impl(y)->value())))return false;
+ if(eq_(k,key(node_type::from_impl(y)->value())))return false;
     }
     return true;
   }
@@ -1122,24 +1122,24 @@
 
     node_impl_pointer y=x->next();
     if(y!=pbuc){
- if(eq(k,key(node_type::from_impl(y)->value()))){
+ if(eq_(k,key(node_type::from_impl(y)->value()))){
         /* adjacent to equivalent element -> in place */
         return true;
       }
       else{
         y=y->next();
         while(y!=pbuc){
- if(eq(k,key(node_type::from_impl(y)->value())))return false;
+ if(eq_(k,key(node_type::from_impl(y)->value())))return false;
           y=y->next();
         }
       }
     }
     while(y->next()!=x){
       y=y->next();
- if(eq(k,key(node_type::from_impl(y)->value()))){
+ if(eq_(k,key(node_type::from_impl(y)->value()))){
         while(y->next()!=x){
           y=y->next();
- if(!eq(k,key(node_type::from_impl(y)->value())))return false;
+ if(!eq_(k,key(node_type::from_impl(y)->value())))return false;
         }
         /* after a group of equivalent elements --> in place */
         return true;
@@ -1158,8 +1158,8 @@
 #endif
 
   key_from_value key;
- hasher hash;
- key_equal eq;
+ hasher hash_;
+ key_equal eq_;
   bucket_array_type buckets;
   float mlf;
   size_type max_load;

Modified: trunk/boost/multi_index/ordered_index.hpp
==============================================================================
--- trunk/boost/multi_index/ordered_index.hpp (original)
+++ trunk/boost/multi_index/ordered_index.hpp 2013-02-15 01:51:48 EST (Fri, 15 Feb 2013)
@@ -1,4 +1,4 @@
-/* Copyright 2003-2011 Joaquin M Lopez Munoz.
+/* Copyright 2003-2013 Joaquin M Lopez Munoz.
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
@@ -421,8 +421,8 @@
   /* observers */
 
   key_from_value key_extractor()const{return key;}
- key_compare key_comp()const{return comp;}
- value_compare value_comp()const{return value_compare(key,comp);}
+ key_compare key_comp()const{return comp_;}
+ value_compare value_comp()const{return value_compare(key,comp_);}
 
   /* set operations */
 
@@ -433,7 +433,7 @@
   template<typename CompatibleKey>
   iterator find(const CompatibleKey& x)const
   {
- return make_iterator(ordered_index_find(root(),header(),key,x,comp));
+ return make_iterator(ordered_index_find(root(),header(),key,x,comp_));
   }
 
   template<typename CompatibleKey,typename CompatibleCompare>
@@ -446,7 +446,7 @@
   template<typename CompatibleKey>
   size_type count(const CompatibleKey& x)const
   {
- return count(x,comp);
+ return count(x,comp_);
   }
 
   template<typename CompatibleKey,typename CompatibleCompare>
@@ -461,7 +461,7 @@
   iterator lower_bound(const CompatibleKey& x)const
   {
     return make_iterator(
- ordered_index_lower_bound(root(),header(),key,x,comp));
+ ordered_index_lower_bound(root(),header(),key,x,comp_));
   }
 
   template<typename CompatibleKey,typename CompatibleCompare>
@@ -476,7 +476,7 @@
   iterator upper_bound(const CompatibleKey& x)const
   {
     return make_iterator(
- ordered_index_upper_bound(root(),header(),key,x,comp));
+ ordered_index_upper_bound(root(),header(),key,x,comp_));
   }
 
   template<typename CompatibleKey,typename CompatibleCompare>
@@ -492,7 +492,7 @@
     const CompatibleKey& x)const
   {
     std::pair<node_type*,node_type*> p=
- ordered_index_equal_range(root(),header(),key,x,comp);
+ ordered_index_equal_range(root(),header(),key,x,comp_);
     return std::pair<iterator,iterator>(
       make_iterator(p.first),make_iterator(p.second));
   }
@@ -534,7 +534,7 @@
   ordered_index(const ctor_args_list& args_list,const allocator_type& al):
     super(args_list.get_tail(),al),
     key(tuples::get<0>(args_list.get_head())),
- comp(tuples::get<1>(args_list.get_head()))
+ comp_(tuples::get<1>(args_list.get_head()))
   {
     empty_initialize();
   }
@@ -548,7 +548,7 @@
 #endif
 
     key(x.key),
- comp(x.comp)
+ comp_(x.comp_)
   {
     /* Copy ctor just takes the key and compare objects from x. The rest is
      * done in subsequent call to copy_().
@@ -680,7 +680,7 @@
   void swap_(ordered_index<KeyFromValue,Compare,SuperMeta,TagList,Category>& x)
   {
     std::swap(key,x.key);
- std::swap(comp,x.comp);
+ std::swap(comp_,x.comp_);
 
 #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
     safe_super::swap(x);
@@ -851,8 +851,8 @@
           if((left_x&&left_x->color()==red)||
              (right_x&&right_x->color()==red))return false;
         }
- if(left_x&&comp(key(x->value()),key(left_x->value())))return false;
- if(right_x&&comp(key(right_x->value()),key(x->value())))return false;
+ if(left_x&&comp_(key(x->value()),key(left_x->value())))return false;
+ if(right_x&&comp_(key(right_x->value()),key(x->value())))return false;
         if(!left_x&&!right_x&&
            node_impl_type::black_count(x->impl(),root()->impl())!=len)
           return false;
@@ -907,7 +907,7 @@
     bool c=true;
     while(x){
       y=x;
- c=comp(k,key(x->value()));
+ c=comp_(k,key(x->value()));
       x=node_type::from_impl(c?x->left():x->right());
     }
     node_type* yy=y;
@@ -920,7 +920,7 @@
       else node_type::decrement(yy);
     }
 
- if(comp(key(yy->value()),k)){
+ if(comp_(key(yy->value()),k)){
       inf.side=c?to_left:to_right;
       inf.pos=y->impl();
       return true;
@@ -938,7 +938,7 @@
     bool c=true;
     while (x){
      y=x;
- c=comp(k,key(x->value()));
+ c=comp_(k,key(x->value()));
      x=node_type::from_impl(c?x->left():x->right());
     }
     inf.side=c?to_left:to_right;
@@ -953,7 +953,7 @@
     bool c=false;
     while (x){
      y=x;
- c=comp(key(x->value()),k);
+ c=comp_(key(x->value()),k);
      x=node_type::from_impl(c?x->right():x->left());
     }
     inf.side=c?to_right:to_left;
@@ -965,7 +965,7 @@
     key_param_type k,node_type* position,link_info& inf,ordered_unique_tag)
   {
     if(position->impl()==header()->left()){
- if(size()>0&&comp(k,key(position->value()))){
+ if(size()>0&&comp_(k,key(position->value()))){
         inf.side=to_left;
         inf.pos=position->impl();
         return true;
@@ -973,7 +973,7 @@
       else return link_point(k,inf,ordered_unique_tag());
     }
     else if(position==header()){
- if(comp(key(rightmost()->value()),k)){
+ if(comp_(key(rightmost()->value()),k)){
         inf.side=to_right;
         inf.pos=rightmost()->impl();
         return true;
@@ -983,7 +983,7 @@
     else{
       node_type* before=position;
       node_type::decrement(before);
- if(comp(key(before->value()),k)&&comp(k,key(position->value()))){
+ if(comp_(key(before->value()),k)&&comp_(k,key(position->value()))){
         if(before->right()==node_impl_pointer(0)){
           inf.side=to_right;
           inf.pos=before->impl();
@@ -1003,7 +1003,7 @@
     key_param_type k,node_type* position,link_info& inf,ordered_non_unique_tag)
   {
     if(position->impl()==header()->left()){
- if(size()>0&&!comp(key(position->value()),k)){
+ if(size()>0&&!comp_(key(position->value()),k)){
         inf.side=to_left;
         inf.pos=position->impl();
         return true;
@@ -1011,7 +1011,7 @@
       else return lower_link_point(k,inf,ordered_non_unique_tag());
     }
     else if(position==header()){
- if(!comp(k,key(rightmost()->value()))){
+ if(!comp_(k,key(rightmost()->value()))){
         inf.side=to_right;
         inf.pos=rightmost()->impl();
         return true;
@@ -1021,8 +1021,8 @@
     else{
       node_type* before=position;
       node_type::decrement(before);
- if(!comp(k,key(before->value()))){
- if(!comp(key(position->value()),k)){
+ if(!comp_(k,key(before->value()))){
+ if(!comp_(key(position->value()),k)){
           if(before->right()==node_impl_pointer(0)){
             inf.side=to_right;
             inf.pos=before->impl();
@@ -1055,12 +1055,12 @@
     if(x!=leftmost()){
       y=x;
       node_type::decrement(y);
- if(!comp(key(y->value()),key(v)))return false;
+ if(!comp_(key(y->value()),key(v)))return false;
     }
 
     y=x;
     node_type::increment(y);
- return y==header()||comp(key(v),key(y->value()));
+ return y==header()||comp_(key(v),key(y->value()));
   }
 
   bool in_place(value_param_type v,node_type* x,ordered_non_unique_tag)
@@ -1069,12 +1069,12 @@
     if(x!=leftmost()){
       y=x;
       node_type::decrement(y);
- if(comp(key(v),key(y->value())))return false;
+ if(comp_(key(v),key(y->value())))return false;
     }
 
     y=x;
     node_type::increment(y);
- return y==header()||!comp(key(y->value()),key(v));
+ return y==header()||!comp_(key(y->value()),key(v));
   }
 
 #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
@@ -1209,10 +1209,10 @@
 
   void rearranger(node_type* position,node_type *x)
   {
- if(!position||comp(key(position->value()),key(x->value()))){
+ if(!position||comp_(key(position->value()),key(x->value()))){
       position=lower_bound(key(x->value())).get_node();
     }
- else if(comp(key(x->value()),key(position->value()))){
+ else if(comp_(key(x->value()),key(position->value()))){
       /* inconsistent rearrangement */
       throw_exception(
         archive::archive_exception(
@@ -1230,7 +1230,7 @@
 #endif /* serialization */
 
   key_from_value key;
- key_compare comp;
+ key_compare comp_;
 
 #if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
     BOOST_WORKAROUND(__MWERKS__,<=0x3003)

Modified: trunk/libs/multi_index/doc/release_notes.html
==============================================================================
--- trunk/libs/multi_index/doc/release_notes.html (original)
+++ trunk/libs/multi_index/doc/release_notes.html 2013-02-15 01:51:48 EST (Fri, 15 Feb 2013)
@@ -31,6 +31,7 @@
 <h2>Contents</h2>
 
 <ul>
+ <li>Boost 1.54 release</li>
   <li>Boost 1.49 release</li>
   <li>Boost 1.48 release</li>
   <li>Boost 1.47 release</li>
@@ -47,6 +48,16 @@
   <li>Boost 1.33 release</li>
 </ul>
 
+<h2><a name="boost_1_54">Boost 1.54 release</a></h2>
+
+<p>
+<ul>
+ <li>Suppressed some potential warnings described in
+ ticket #8034.
+ </li>
+</ul>
+</p>
+
 <h2><a name="boost_1_49">Boost 1.49 release</a></h2>
 
 <p>
@@ -359,9 +370,9 @@
 
 <br>
 
-<p>Revised November 24th 2011</p>
+<p>Revised February 14th 2013</p>
 
-<p>&copy; Copyright 2003-2011 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
+<p>&copy; Copyright 2003-2013 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
 Distributed under the Boost Software
 License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt">
 LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">


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