Ticket #7227: boost-container2.patch
File boost-container2.patch, 6.4 KB (added by , 10 years ago) |
---|
-
boost/container/detail/adaptive_node_pool_impl.hpp
old new 557 557 //element of the tree 558 558 char *mem_address = static_cast<char*> 559 559 (mp_segment_mngr_base->allocate_aligned(real_block_size, m_real_block_alignment)); 560 if(!mem_address) throw std::bad_alloc();560 if(!mem_address) BOOST_THROW_EXCEPTION(std::bad_alloc()); 561 561 ++m_totally_free_blocks; 562 562 block_info_t *c_info = new(mem_address)block_info_t; 563 563 m_block_multiset.insert(m_block_multiset.end(), *c_info); … … 584 584 //element of the tree 585 585 char *mem_address = static_cast<char*> 586 586 (mp_segment_mngr_base->allocate_aligned(real_block_size, m_real_block_alignment)); 587 if(!mem_address) throw std::bad_alloc();587 if(!mem_address) BOOST_THROW_EXCEPTION(std::bad_alloc()); 588 588 ++m_totally_free_blocks; 589 589 590 590 //First initialize header information on the last subblock -
boost/container/flat_map.hpp
old new 410 410 { 411 411 iterator i = this->find(k); 412 412 if(i == this->end()){ 413 throw std::out_of_range("key not found");413 BOOST_THROW_EXCEPTION(std::out_of_range("key not found")); 414 414 } 415 415 return i->second; 416 416 } … … 422 422 { 423 423 const_iterator i = this->find(k); 424 424 if(i == this->end()){ 425 throw std::out_of_range("key not found");425 BOOST_THROW_EXCEPTION(std::out_of_range("key not found")); 426 426 } 427 427 return i->second; 428 428 } -
boost/container/list.hpp
old new 931 931 this->icont().splice(p.get(), x.icont()); 932 932 } 933 933 else{ 934 throw std::runtime_error("list::splice called with unequal allocators");934 BOOST_THROW_EXCEPTION(std::runtime_error("list::splice called with unequal allocators")); 935 935 } 936 936 } 937 937 … … 955 955 this->icont().splice(p.get(), x.icont(), i.get()); 956 956 } 957 957 else{ 958 throw std::runtime_error("list::splice called with unequal allocators");958 BOOST_THROW_EXCEPTION(std::runtime_error("list::splice called with unequal allocators")); 959 959 } 960 960 } 961 961 … … 978 978 this->icont().splice(p.get(), x.icont(), first.get(), last.get()); 979 979 } 980 980 else{ 981 throw std::runtime_error("list::splice called with unequal allocators");981 BOOST_THROW_EXCEPTION(std::runtime_error("list::splice called with unequal allocators")); 982 982 } 983 983 } 984 984 … … 1002 1002 this->icont().splice(p.get(), x.icont(), first.get(), last.get(), n); 1003 1003 } 1004 1004 else{ 1005 throw std::runtime_error("list::splice called with unequal allocators");1005 BOOST_THROW_EXCEPTION(std::runtime_error("list::splice called with unequal allocators")); 1006 1006 } 1007 1007 } 1008 1008 … … 1107 1107 ValueCompareToNodeCompare<StrictWeakOrdering>(comp)); 1108 1108 } 1109 1109 else{ 1110 throw std::runtime_error("list::merge called with unequal allocators");1110 BOOST_THROW_EXCEPTION(std::runtime_error("list::merge called with unequal allocators")); 1111 1111 } 1112 1112 } 1113 1113 -
boost/container/map.hpp
old new 363 363 { 364 364 iterator i = this->find(k); 365 365 if(i == this->end()){ 366 throw std::out_of_range("key not found");366 BOOST_THROW_EXCEPTION(std::out_of_range("key not found")); 367 367 } 368 368 return i->second; 369 369 } … … 375 375 { 376 376 const_iterator i = this->find(k); 377 377 if(i == this->end()){ 378 throw std::out_of_range("key not found");378 BOOST_THROW_EXCEPTION(std::out_of_range("key not found")); 379 379 } 380 380 return i->second; 381 381 } -
boost/container/slist.hpp
old new 989 989 this->icont().splice_after(prev_pos.get(), x.icont()); 990 990 } 991 991 else{ 992 throw std::runtime_error("slist::splice called with unequal allocators");992 BOOST_THROW_EXCEPTION(std::runtime_error("slist::splice called with unequal allocators")); 993 993 } 994 994 } 995 995 … … 1013 1013 this->icont().splice_after(prev_pos.get(), x.icont(), prev.get()); 1014 1014 } 1015 1015 else{ 1016 throw std::runtime_error("slist::splice called with unequal allocators");1016 BOOST_THROW_EXCEPTION(std::runtime_error("slist::splice called with unequal allocators")); 1017 1017 } 1018 1018 } 1019 1019 … … 1039 1039 (prev_pos.get(), x.icont(), before_first.get(), before_last.get()); 1040 1040 } 1041 1041 else{ 1042 throw std::runtime_error("slist::splice called with unequal allocators");1042 BOOST_THROW_EXCEPTION(std::runtime_error("slist::splice called with unequal allocators")); 1043 1043 } 1044 1044 } 1045 1045 … … 1067 1067 (prev_pos.get(), x.icont(), before_first.get(), before_last.get(), n); 1068 1068 } 1069 1069 else{ 1070 throw std::runtime_error("slist::splice called with unequal allocators");1070 BOOST_THROW_EXCEPTION(std::runtime_error("slist::splice called with unequal allocators")); 1071 1071 } 1072 1072 } 1073 1073 … … 1222 1222 ValueCompareToNodeCompare<StrictWeakOrdering>(comp)); 1223 1223 } 1224 1224 else{ 1225 throw std::runtime_error("list::merge called with unequal allocators");1225 BOOST_THROW_EXCEPTION(std::runtime_error("list::merge called with unequal allocators")); 1226 1226 } 1227 1227 } 1228 1228 -
boost/container/stable_vector.hpp
old new 819 819 { 820 820 STABLE_VECTOR_CHECK_INVARIANT; 821 821 if(n > this->max_size()) 822 throw std::bad_alloc();822 BOOST_THROW_EXCEPTION(std::bad_alloc()); 823 823 824 824 size_type size = this->size(); 825 825 size_type old_capacity = this->capacity(); … … 870 870 reference at(size_type n) 871 871 { 872 872 if(n>=size()) 873 throw std::out_of_range("invalid subscript at stable_vector::at");873 BOOST_THROW_EXCEPTION(std::out_of_range("invalid subscript at stable_vector::at")); 874 874 return operator[](n); 875 875 } 876 876 … … 885 885 const_reference at(size_type n)const 886 886 { 887 887 if(n>=size()) 888 throw std::out_of_range("invalid subscript at stable_vector::at");888 BOOST_THROW_EXCEPTION(std::out_of_range("invalid subscript at stable_vector::at")); 889 889 return operator[](n); 890 890 } 891 891