Ticket #4018: boost_multi_index_gcc_warning_cleanup.2.diff
File boost_multi_index_gcc_warning_cleanup.2.diff, 7.3 KB (added by , 12 years ago) |
---|
-
boost/multi_index/sequenced_index.hpp
346 346 } 347 347 348 348 template<typename Modifier,typename Rollback> 349 bool modify(iterator position,Modifier mod,Rollback back)349 bool modify(iterator position,Modifier mod,Rollback p_back) 350 350 { 351 351 BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position); 352 352 BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position); … … 363 363 #endif 364 364 365 365 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())); 367 367 } 368 368 369 369 void swap(sequenced_index<SuperMeta,TagList>& x) -
boost/multi_index/ordered_index.hpp
436 436 437 437 template<typename CompatibleKey,typename CompatibleCompare> 438 438 iterator find( 439 const CompatibleKey& x,const CompatibleCompare& comp)const439 const CompatibleKey& x,const CompatibleCompare& p_comp)const 440 440 { 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)); 442 442 } 443 443 444 444 template<typename CompatibleKey> … … 448 448 } 449 449 450 450 template<typename CompatibleKey,typename CompatibleCompare> 451 size_type count(const CompatibleKey& x,const CompatibleCompare& comp)const451 size_type count(const CompatibleKey& x,const CompatibleCompare& p_comp)const 452 452 { 453 std::pair<iterator,iterator> p=equal_range(x, comp);453 std::pair<iterator,iterator> p=equal_range(x,p_comp); 454 454 size_type n=std::distance(p.first,p.second); 455 455 return n; 456 456 } … … 464 464 465 465 template<typename CompatibleKey,typename CompatibleCompare> 466 466 iterator lower_bound( 467 const CompatibleKey& x,const CompatibleCompare& comp)const467 const CompatibleKey& x,const CompatibleCompare& p_comp)const 468 468 { 469 469 return make_iterator( 470 ordered_index_lower_bound(root(),header(),key,x, comp));470 ordered_index_lower_bound(root(),header(),key,x,p_comp)); 471 471 } 472 472 473 473 template<typename CompatibleKey> … … 479 479 480 480 template<typename CompatibleKey,typename CompatibleCompare> 481 481 iterator upper_bound( 482 const CompatibleKey& x,const CompatibleCompare& comp)const482 const CompatibleKey& x,const CompatibleCompare& p_comp)const 483 483 { 484 484 return make_iterator( 485 ordered_index_upper_bound(root(),header(),key,x, comp));485 ordered_index_upper_bound(root(),header(),key,x,p_comp)); 486 486 } 487 487 488 488 template<typename CompatibleKey> … … 497 497 498 498 template<typename CompatibleKey,typename CompatibleCompare> 499 499 std::pair<iterator,iterator> equal_range( 500 const CompatibleKey& x,const CompatibleCompare& comp)const500 const CompatibleKey& x,const CompatibleCompare& p_comp)const 501 501 { 502 502 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); 504 504 return std::pair<iterator,iterator>( 505 505 make_iterator(p.first),make_iterator(p.second)); 506 506 } -
boost/multi_index/detail/index_matcher.hpp
132 132 entries(),entries()+size_, 133 133 entry(node),entry::less_by_node()); /* localize entry */ 134 134 ent->ordered=false; 135 std::size_t n=ent->pos; /* get its position */135 std::size_t epn=ent->pos; /* get its position */ 136 136 137 137 entry dummy(0); 138 dummy.pile_top= n;138 dummy.pile_top=epn; 139 139 140 140 entry* pile_ent= /* find the first available pile */ 141 141 std::lower_bound( /* to stack the entry */ 142 142 entries(),entries()+num_piles, 143 143 dummy,entry::less_by_pile_top()); 144 144 145 pile_ent->pile_top= n; /* stack the entry */145 pile_ent->pile_top=epn; /* stack the entry */ 146 146 pile_ent->pile_top_entry=ent; 147 147 148 148 /* if not the first pile, link entry to top of the preceding pile */ … … 164 164 */ 165 165 166 166 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--;){ 168 168 ent->ordered=true; 169 169 ent=ent->previous; 170 170 } -
boost/multi_index_container.hpp
360 360 IteratorType it 361 361 BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int,N)) 362 362 { 363 typedef typename nth_index<N>::type index;363 typedef typename nth_index<N>::type nindex; 364 364 365 365 #if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */ 366 366 BOOST_STATIC_ASSERT( … … 371 371 BOOST_MULTI_INDEX_CHECK_IS_OWNER( 372 372 it,static_cast<typename IteratorType::container_type&>(*this)); 373 373 374 return index::make_iterator(static_cast<node_type*>(it.get_node()));374 return nindex::make_iterator(static_cast<node_type*>(it.get_node())); 375 375 } 376 376 377 377 template<int N,typename IteratorType> … … 379 379 IteratorType it 380 380 BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int,N))const 381 381 { 382 typedef typename nth_index<N>::type index;382 typedef typename nth_index<N>::type nindex; 383 383 384 384 #if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */ 385 385 BOOST_STATIC_ASSERT(( … … 390 390 BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); 391 391 BOOST_MULTI_INDEX_CHECK_IS_OWNER( 392 392 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())); 394 394 } 395 395 #endif 396 396 … … 414 414 IteratorType it 415 415 BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(Tag)) 416 416 { 417 typedef typename index<Tag>::type index;417 typedef typename index<Tag>::type nindex; 418 418 419 419 #if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */ 420 420 BOOST_STATIC_ASSERT( … … 424 424 BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); 425 425 BOOST_MULTI_INDEX_CHECK_IS_OWNER( 426 426 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())); 428 428 } 429 429 430 430 template<typename Tag,typename IteratorType> … … 432 432 IteratorType it 433 433 BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(Tag))const 434 434 { 435 typedef typename index<Tag>::type index;435 typedef typename index<Tag>::type nindex; 436 436 437 437 #if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */ 438 438 BOOST_STATIC_ASSERT(( … … 443 443 BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); 444 444 BOOST_MULTI_INDEX_CHECK_IS_OWNER( 445 445 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())); 447 447 } 448 448 #endif 449 449