From 6be32f3ba4e7bf7f7f0e8181b9ff450978d1aa47 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Fri, 7 Oct 2022 16:38:19 +0200 Subject: [PATCH] reverted 74c2ae627a8694ce6c3922cbd7fce8b7db998814 and explicitly silenced VS warning --- include/boost/unordered/detail/foa.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index 595fdf3e..2d8f7363 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -959,14 +959,18 @@ public: return *this; } +#if defined(BOOST_MSVC) +#pragma warning(push) +#pragma warning(disable:4127) /* conditional expression is constant */ +#endif + table& operator=(table&& x) noexcept( alloc_traits::is_always_equal::value&& std::is_nothrow_move_assignable::value&& std::is_nothrow_move_assignable::value) { - /* not constexpr to avoid constant conditional expression warnings in VS */ - const auto pocma= + static constexpr auto pocma= alloc_traits::propagate_on_container_move_assignment::value; /* Avoid using nested lambdas with a `this` capture as it seems to trigger @@ -1019,6 +1023,10 @@ public: return *this; } +#if defined(BOOST_MSVC) +#pragma warning(pop) /* C4127 */ +#endif + allocator_type get_allocator()const noexcept{return al();} iterator begin()noexcept