Ticket #4018: boost_multi_index_gcc_warning_cleanup.2.diff

File boost_multi_index_gcc_warning_cleanup.2.diff, 7.3 KB (added by tatu.kilappa@…, 12 years ago)

Updated patch file for current trunk, also fixes earlier dangling typedef issue.

  • boost/multi_index/sequenced_index.hpp

     
    346346  }
    347347
    348348  template<typename Modifier,typename Rollback>
    349   bool modify(iterator position,Modifier mod,Rollback back)
     349  bool modify(iterator position,Modifier mod,Rollback p_back)
    350350  {
    351351    BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
    352352    BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
     
    363363#endif
    364364
    365365    return this->final_modify_(
    366       mod,back,static_cast<final_node_type*>(position.get_node()));
     366      mod,p_back,static_cast<final_node_type*>(position.get_node()));
    367367  }
    368368
    369369  void swap(sequenced_index<SuperMeta,TagList>& x)
  • boost/multi_index/ordered_index.hpp

     
    436436
    437437  template<typename CompatibleKey,typename CompatibleCompare>
    438438  iterator find(
    439     const CompatibleKey& x,const CompatibleCompare& comp)const
     439    const CompatibleKey& x,const CompatibleCompare& p_comp)const
    440440  {
    441     return make_iterator(ordered_index_find(root(),header(),key,x,comp));
     441    return make_iterator(ordered_index_find(root(),header(),key,x,p_comp));
    442442  }
    443443
    444444  template<typename CompatibleKey>
     
    448448  }
    449449
    450450  template<typename CompatibleKey,typename CompatibleCompare>
    451   size_type count(const CompatibleKey& x,const CompatibleCompare& comp)const
     451  size_type count(const CompatibleKey& x,const CompatibleCompare& p_comp)const
    452452  {
    453     std::pair<iterator,iterator> p=equal_range(x,comp);
     453    std::pair<iterator,iterator> p=equal_range(x,p_comp);
    454454    size_type n=std::distance(p.first,p.second);
    455455    return n;
    456456  }
     
    464464
    465465  template<typename CompatibleKey,typename CompatibleCompare>
    466466  iterator lower_bound(
    467     const CompatibleKey& x,const CompatibleCompare& comp)const
     467    const CompatibleKey& x,const CompatibleCompare& p_comp)const
    468468  {
    469469    return make_iterator(
    470       ordered_index_lower_bound(root(),header(),key,x,comp));
     470      ordered_index_lower_bound(root(),header(),key,x,p_comp));
    471471  }
    472472
    473473  template<typename CompatibleKey>
     
    479479
    480480  template<typename CompatibleKey,typename CompatibleCompare>
    481481  iterator upper_bound(
    482     const CompatibleKey& x,const CompatibleCompare& comp)const
     482    const CompatibleKey& x,const CompatibleCompare& p_comp)const
    483483  {
    484484    return make_iterator(
    485       ordered_index_upper_bound(root(),header(),key,x,comp));
     485      ordered_index_upper_bound(root(),header(),key,x,p_comp));
    486486  }
    487487
    488488  template<typename CompatibleKey>
     
    497497
    498498  template<typename CompatibleKey,typename CompatibleCompare>
    499499  std::pair<iterator,iterator> equal_range(
    500     const CompatibleKey& x,const CompatibleCompare& comp)const
     500    const CompatibleKey& x,const CompatibleCompare& p_comp)const
    501501  {
    502502    std::pair<node_type*,node_type*> p=
    503       ordered_index_equal_range(root(),header(),key,x,comp);
     503      ordered_index_equal_range(root(),header(),key,x,p_comp);
    504504    return std::pair<iterator,iterator>(
    505505      make_iterator(p.first),make_iterator(p.second));
    506506  }
  • boost/multi_index/detail/index_matcher.hpp

     
    132132        entries(),entries()+size_,
    133133        entry(node),entry::less_by_node()); /* localize entry */
    134134    ent->ordered=false;
    135     std::size_t n=ent->pos;                 /* get its position */
     135    std::size_t epn=ent->pos;                 /* get its position */
    136136
    137137    entry dummy(0);
    138     dummy.pile_top=n;
     138    dummy.pile_top=epn;
    139139
    140140    entry* pile_ent=                        /* find the first available pile */
    141141      std::lower_bound(                     /* to stack the entry            */
    142142        entries(),entries()+num_piles,
    143143        dummy,entry::less_by_pile_top());
    144144
    145     pile_ent->pile_top=n;                   /* stack the entry */
     145    pile_ent->pile_top=epn;                   /* stack the entry */
    146146    pile_ent->pile_top_entry=ent;       
    147147
    148148    /* if not the first pile, link entry to top of the preceding pile */
     
    164164       */
    165165
    166166      entry* ent=entries()[num_piles-1].pile_top_entry;
    167       for(std::size_t n=num_piles;n--;){
     167      for(std::size_t nn=num_piles;nn--;){
    168168        ent->ordered=true;
    169169        ent=ent->previous;
    170170      }
  • boost/multi_index_container.hpp

     
    360360    IteratorType it
    361361    BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int,N))
    362362  {
    363     typedef typename nth_index<N>::type index;
     363    typedef typename nth_index<N>::type nindex;
    364364
    365365#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
    366366    BOOST_STATIC_ASSERT(
     
    371371    BOOST_MULTI_INDEX_CHECK_IS_OWNER(
    372372      it,static_cast<typename IteratorType::container_type&>(*this));
    373373
    374     return index::make_iterator(static_cast<node_type*>(it.get_node()));
     374    return nindex::make_iterator(static_cast<node_type*>(it.get_node()));
    375375  }
    376376
    377377  template<int N,typename IteratorType>
     
    379379    IteratorType it
    380380    BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int,N))const
    381381  {
    382     typedef typename nth_index<N>::type index;
     382    typedef typename nth_index<N>::type nindex;
    383383
    384384#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
    385385    BOOST_STATIC_ASSERT((
     
    390390    BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
    391391    BOOST_MULTI_INDEX_CHECK_IS_OWNER(
    392392      it,static_cast<const typename IteratorType::container_type&>(*this));
    393     return index::make_iterator(static_cast<node_type*>(it.get_node()));
     393    return nindex::make_iterator(static_cast<node_type*>(it.get_node()));
    394394  }
    395395#endif
    396396
     
    414414    IteratorType it
    415415    BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(Tag))
    416416  {
    417     typedef typename index<Tag>::type index;
     417    typedef typename index<Tag>::type nindex;
    418418
    419419#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
    420420    BOOST_STATIC_ASSERT(
     
    424424    BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
    425425    BOOST_MULTI_INDEX_CHECK_IS_OWNER(
    426426      it,static_cast<typename IteratorType::container_type&>(*this));
    427     return index::make_iterator(static_cast<node_type*>(it.get_node()));
     427    return nindex::make_iterator(static_cast<node_type*>(it.get_node()));
    428428  }
    429429
    430430  template<typename Tag,typename IteratorType>
     
    432432    IteratorType it
    433433    BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(Tag))const
    434434  {
    435     typedef typename index<Tag>::type index;
     435    typedef typename index<Tag>::type nindex;
    436436
    437437#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */
    438438    BOOST_STATIC_ASSERT((
     
    443443    BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it);
    444444    BOOST_MULTI_INDEX_CHECK_IS_OWNER(
    445445      it,static_cast<const typename IteratorType::container_type&>(*this));
    446     return index::make_iterator(static_cast<node_type*>(it.get_node()));
     446    return nindex::make_iterator(static_cast<node_type*>(it.get_node()));
    447447  }
    448448#endif
    449449