From de0366105c644e4a1aa0195fdefbac3e842e1272 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 10 Aug 2013 13:09:28 +0000 Subject: [PATCH] Avoid Visual C++ warning. Avoiding: warning C4127: conditional expression is constant [SVN r85281] --- include/boost/unordered/detail/buckets.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/boost/unordered/detail/buckets.hpp b/include/boost/unordered/detail/buckets.hpp index a264279d..95d8df18 100644 --- a/include/boost/unordered/detail/buckets.hpp +++ b/include/boost/unordered/detail/buckets.hpp @@ -727,15 +727,18 @@ namespace boost { namespace unordered { namespace detail { new((void*) &funcs_[which]) function_pair(hf, eq); } - void construct(bool which, function_pair const& f) + void construct(bool which, function_pair const& f, + boost::unordered::detail::false_type = + boost::unordered::detail::false_type()) { new((void*) &funcs_[which]) function_pair(f); } void construct(bool which, function_pair& f, - boost::unordered::detail::move_tag m) + boost::unordered::detail::true_type) { - new((void*) &funcs_[which]) function_pair(f, m); + new((void*) &funcs_[which]) function_pair(f, + boost::unordered::detail::move_tag()); } void destroy(bool which) @@ -760,15 +763,12 @@ namespace boost { namespace unordered { namespace detail { construct(current_, bf.current()); } - functions(functions& bf, boost::unordered::detail::move_tag m) + functions(functions& bf, boost::unordered::detail::move_tag) : current_(false) { - if (nothrow_move_constructible) { - construct(current_, bf.current(), m); - } - else { - construct(current_, bf.current()); - } + construct(current_, bf.current(), + boost::unordered::detail::integral_constant()); } ~functions() {