From 119f040e89e698c2d557465a224853ab68e4690b Mon Sep 17 00:00:00 2001
From: Franz Detro <franz.detro@native-instruments.de>
Date: Tue, 4 Sep 2012 15:19:47 +0200
Subject: [PATCH] fix warnings in some more boost libraries
---
boost/circular_buffer/base.hpp | 2 +-
boost/circular_buffer/space_optimized.hpp | 4 ++--
boost/detail/utf8_codecvt_facet.hpp | 2 ++
boost/lambda/detail/ret.hpp | 2 +-
boost/multi_index/detail/index_matcher.hpp | 8 ++++----
boost/multi_index/ordered_index.hpp | 20 ++++++++++----------
boost/optional/optional.hpp | 4 ++--
boost/parameter/aux_/tagged_argument.hpp | 4 ++--
boost/regex/v4/basic_regex_parser.hpp | 2 +-
boost/serialization/smart_cast.hpp | 2 +-
boost/token_functions.hpp | 2 +-
boost/xpressive/match_results.hpp | 2 +-
boost/xpressive/traits/cpp_regex_traits.hpp | 6 +++---
13 files changed, 31 insertions(+), 29 deletions(-)
diff --git a/boost/circular_buffer/base.hpp b/boost/circular_buffer/base.hpp
index 3b9886a..4893cb2 100644
|
a
|
b
|
private:
|
| 2316 | 2316 | } |
| 2317 | 2317 | |
| 2318 | 2318 | //! Specialized method for swapping the allocator. |
| 2319 | | void swap_allocator(circular_buffer<T, Alloc>& cb, const true_type&) { |
| | 2319 | void swap_allocator(circular_buffer<T, Alloc>&, const true_type&) { |
| 2320 | 2320 | // Swap is not needed because allocators have no state. |
| 2321 | 2321 | } |
| 2322 | 2322 | |
diff --git a/boost/circular_buffer/space_optimized.hpp b/boost/circular_buffer/space_optimized.hpp
index 9c76afe..5350676 100644
|
a
|
b
|
private:
|
| 1300 | 1300 | |
| 1301 | 1301 | //! Specialized method for determining the initial capacity. |
| 1302 | 1302 | template <class IntegralType> |
| 1303 | | static size_type init_capacity(const capacity_type& capacity_ctrl, IntegralType n, IntegralType item, |
| | 1303 | static size_type init_capacity(const capacity_type& capacity_ctrl, IntegralType n, IntegralType, |
| 1304 | 1304 | const true_type&) { |
| 1305 | 1305 | return init_capacity(capacity_ctrl, static_cast<size_type>(n)); |
| 1306 | 1306 | } |
| … |
… |
private:
|
| 1320 | 1320 | |
| 1321 | 1321 | //! Specialized method for determining the initial capacity. |
| 1322 | 1322 | template <class InputIterator> |
| 1323 | | static size_type init_capacity(const capacity_type& capacity_ctrl, InputIterator first, InputIterator last, |
| | 1323 | static size_type init_capacity(const capacity_type& capacity_ctrl, InputIterator, InputIterator, |
| 1324 | 1324 | const std::input_iterator_tag&) { |
| 1325 | 1325 | return capacity_ctrl.capacity(); |
| 1326 | 1326 | } |
diff --git a/boost/detail/utf8_codecvt_facet.hpp b/boost/detail/utf8_codecvt_facet.hpp
index b777ff9..592e70c 100644
|
a
|
b
|
protected:
|
| 179 | 179 | ) const; |
| 180 | 180 | #endif |
| 181 | 181 | |
| | 182 | using std::codecvt<wchar_t, char, std::mbstate_t>::do_length; |
| | 183 | |
| 182 | 184 | // Largest possible value do_length(state,from,from_end,1) could return. |
| 183 | 185 | virtual int do_max_length() const throw () { |
| 184 | 186 | return 6; // largest UTF-8 encoding of a UCS-4 character |
diff --git a/boost/lambda/detail/ret.hpp b/boost/lambda/detail/ret.hpp
index fbd8b3a..c02e7be 100644
|
a
|
b
|
inline const
|
| 284 | 284 | lambda_functor< |
| 285 | 285 | lambda_functor_base<do_nothing_action, null_type> |
| 286 | 286 | > |
| 287 | | make_void(const Arg1& a1) { |
| | 287 | make_void(const Arg1& /*a1*/) { |
| 288 | 288 | return |
| 289 | 289 | lambda_functor_base<do_nothing_action, null_type>(); |
| 290 | 290 | } |
diff --git a/boost/multi_index/detail/index_matcher.hpp b/boost/multi_index/detail/index_matcher.hpp
index 5828137..1c03144 100644
|
a
|
b
|
protected:
|
| 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 np=ent->pos; /* get its position */ |
| 136 | 136 | |
| 137 | 137 | entry dummy(0); |
| 138 | | dummy.pile_top=n; |
| | 138 | dummy.pile_top=np; |
| 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=np; /* 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 */ |
| … |
… |
protected:
|
| 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 np=num_piles;np--;){ |
| 168 | 168 | ent->ordered=true; |
| 169 | 169 | ent=ent->previous; |
| 170 | 170 | } |
diff --git a/boost/multi_index/ordered_index.hpp b/boost/multi_index/ordered_index.hpp
index 20475e0..23308fb 100644
|
a
|
b
|
public:
|
| 438 | 438 | |
| 439 | 439 | template<typename CompatibleKey,typename CompatibleCompare> |
| 440 | 440 | iterator find( |
| 441 | | const CompatibleKey& x,const CompatibleCompare& comp)const |
| | 441 | const CompatibleKey& x,const CompatibleCompare& comp_)const |
| 442 | 442 | { |
| 443 | | return make_iterator(ordered_index_find(root(),header(),key,x,comp)); |
| | 443 | return make_iterator(ordered_index_find(root(),header(),key,x,comp_)); |
| 444 | 444 | } |
| 445 | 445 | |
| 446 | 446 | template<typename CompatibleKey> |
| … |
… |
public:
|
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | template<typename CompatibleKey,typename CompatibleCompare> |
| 453 | | size_type count(const CompatibleKey& x,const CompatibleCompare& comp)const |
| | 453 | size_type count(const CompatibleKey& x,const CompatibleCompare& comp_)const |
| 454 | 454 | { |
| 455 | | std::pair<iterator,iterator> p=equal_range(x,comp); |
| | 455 | std::pair<iterator,iterator> p=equal_range(x,comp_); |
| 456 | 456 | size_type n=std::distance(p.first,p.second); |
| 457 | 457 | return n; |
| 458 | 458 | } |
| … |
… |
public:
|
| 466 | 466 | |
| 467 | 467 | template<typename CompatibleKey,typename CompatibleCompare> |
| 468 | 468 | iterator lower_bound( |
| 469 | | const CompatibleKey& x,const CompatibleCompare& comp)const |
| | 469 | const CompatibleKey& x,const CompatibleCompare& comp_)const |
| 470 | 470 | { |
| 471 | 471 | return make_iterator( |
| 472 | | ordered_index_lower_bound(root(),header(),key,x,comp)); |
| | 472 | ordered_index_lower_bound(root(),header(),key,x,comp_)); |
| 473 | 473 | } |
| 474 | 474 | |
| 475 | 475 | template<typename CompatibleKey> |
| … |
… |
public:
|
| 481 | 481 | |
| 482 | 482 | template<typename CompatibleKey,typename CompatibleCompare> |
| 483 | 483 | iterator upper_bound( |
| 484 | | const CompatibleKey& x,const CompatibleCompare& comp)const |
| | 484 | const CompatibleKey& x,const CompatibleCompare& comp_)const |
| 485 | 485 | { |
| 486 | 486 | return make_iterator( |
| 487 | | ordered_index_upper_bound(root(),header(),key,x,comp)); |
| | 487 | ordered_index_upper_bound(root(),header(),key,x,comp_)); |
| 488 | 488 | } |
| 489 | 489 | |
| 490 | 490 | template<typename CompatibleKey> |
| … |
… |
public:
|
| 499 | 499 | |
| 500 | 500 | template<typename CompatibleKey,typename CompatibleCompare> |
| 501 | 501 | std::pair<iterator,iterator> equal_range( |
| 502 | | const CompatibleKey& x,const CompatibleCompare& comp)const |
| | 502 | const CompatibleKey& x,const CompatibleCompare& comp_)const |
| 503 | 503 | { |
| 504 | 504 | std::pair<node_type*,node_type*> p= |
| 505 | | ordered_index_equal_range(root(),header(),key,x,comp); |
| | 505 | ordered_index_equal_range(root(),header(),key,x,comp_); |
| 506 | 506 | return std::pair<iterator,iterator>( |
| 507 | 507 | make_iterator(p.first),make_iterator(p.second)); |
| 508 | 508 | } |
diff --git a/boost/optional/optional.hpp b/boost/optional/optional.hpp
index ec9006e..e3d4245 100644
|
a
|
b
|
bool operator >= ( optional<T> const& x, none_t y )
|
| 890 | 890 | |
| 891 | 891 | template<class T> |
| 892 | 892 | inline |
| 893 | | bool operator == ( none_t x, optional<T> const& y ) |
| | 893 | bool operator == ( none_t, optional<T> const& y ) |
| 894 | 894 | { return equal_pointees(optional<T>() ,y); } |
| 895 | 895 | |
| 896 | 896 | template<class T> |
| 897 | 897 | inline |
| 898 | | bool operator < ( none_t x, optional<T> const& y ) |
| | 898 | bool operator < ( none_t, optional<T> const& y ) |
| 899 | 899 | { return less_pointees(optional<T>() ,y); } |
| 900 | 900 | |
| 901 | 901 | template<class T> |
diff --git a/boost/parameter/aux_/tagged_argument.hpp b/boost/parameter/aux_/tagged_argument.hpp
index 6248be2..54b63ab 100644
|
a
|
b
|
struct tagged_argument : tagged_argument_base
|
| 120 | 120 | } |
| 121 | 121 | # else |
| 122 | 122 | template <class Default> |
| 123 | | reference operator[](default_<key_type,Default> const& x) const |
| | 123 | reference operator[](default_<key_type,Default> const&) const |
| 124 | 124 | { |
| 125 | 125 | return value; |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | template <class F> |
| 129 | | reference operator[](lazy_default<key_type,F> const& x) const |
| | 129 | reference operator[](lazy_default<key_type,F> const&) const |
| 130 | 130 | { |
| 131 | 131 | return value; |
| 132 | 132 | } |
diff --git a/boost/regex/v4/basic_regex_parser.hpp b/boost/regex/v4/basic_regex_parser.hpp
index 72dc4ee..5dfb81e 100644
|
a
|
b
|
bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
|
| 1107 | 1107 | } |
| 1108 | 1108 | // get the value if any: |
| 1109 | 1109 | v = this->m_traits.toi(m_position, m_end, 10); |
| 1110 | | max = (v >= 0) ? v : (std::numeric_limits<std::size_t>::max)(); |
| | 1110 | max = (v >= 0) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)(); |
| 1111 | 1111 | } |
| 1112 | 1112 | else |
| 1113 | 1113 | { |
diff --git a/boost/serialization/smart_cast.hpp b/boost/serialization/smart_cast.hpp
index c240a55..61bd3ed 100644
|
a
|
b
|
namespace smart_cast_impl {
|
| 249 | 249 | // cast on a system which doesn't support partial template |
| 250 | 250 | // specialization |
| 251 | 251 | template<class U> |
| 252 | | static T cast(U u){ |
| | 252 | static T cast(U){ |
| 253 | 253 | BOOST_STATIC_ASSERT(sizeof(T)==0); |
| 254 | 254 | return * static_cast<T *>(NULL); |
| 255 | 255 | } |
diff --git a/boost/token_functions.hpp b/boost/token_functions.hpp
index 4d1a1df..1f24efa 100644
|
a
|
b
|
namespace boost{
|
| 309 | 309 | template <> |
| 310 | 310 | struct assign_or_plus_equal<std::input_iterator_tag> { |
| 311 | 311 | template<class Iterator, class Token> |
| 312 | | static void assign(Iterator b, Iterator e, Token &t) { } |
| | 312 | static void assign(Iterator, Iterator, Token &) { } |
| 313 | 313 | template<class Token, class Value> |
| 314 | 314 | static void plus_equal(Token &t, const Value &v) { |
| 315 | 315 | t += v; |
diff --git a/boost/xpressive/match_results.hpp b/boost/xpressive/match_results.hpp
index 6e9516d..ae1cd40 100644
|
a
|
b
|
private:
|
| 934 | 934 | ( |
| 935 | 935 | OutputIterator out |
| 936 | 936 | , Expr const &format |
| 937 | | , regex_constants::match_flag_type flags |
| | 937 | , regex_constants::match_flag_type |
| 938 | 938 | , mpl::size_t<4> |
| 939 | 939 | ) const |
| 940 | 940 | { |
diff --git a/boost/xpressive/traits/cpp_regex_traits.hpp b/boost/xpressive/traits/cpp_regex_traits.hpp
index 74a904c..751ec13 100644
|
a
|
b
|
struct cpp_regex_traits
|
| 467 | 467 | /// |
| 468 | 468 | /// \attention Not currently used |
| 469 | 469 | template<typename FwdIter> |
| 470 | | string_type transform(FwdIter begin, FwdIter end) const |
| | 470 | string_type transform(FwdIter, FwdIter) const |
| 471 | 471 | { |
| 472 | 472 | //string_type str(begin, end); |
| 473 | 473 | //return this->transform(str.data(), str.data() + str.size()); |
| … |
… |
struct cpp_regex_traits
|
| 483 | 483 | /// |
| 484 | 484 | /// \attention Not currently used |
| 485 | 485 | template<typename FwdIter> |
| 486 | | string_type transform_primary(FwdIter begin, FwdIter end) const |
| | 486 | string_type transform_primary(FwdIter, FwdIter ) const |
| 487 | 487 | { |
| 488 | 488 | BOOST_ASSERT(false); // TODO implement me |
| 489 | 489 | return string_type(); |
| … |
… |
struct cpp_regex_traits
|
| 495 | 495 | /// |
| 496 | 496 | /// \attention Not currently used |
| 497 | 497 | template<typename FwdIter> |
| 498 | | string_type lookup_collatename(FwdIter begin, FwdIter end) const |
| | 498 | string_type lookup_collatename(FwdIter, FwdIter) const |
| 499 | 499 | { |
| 500 | 500 | BOOST_ASSERT(false); // TODO implement me |
| 501 | 501 | return string_type(); |