From 6a00c7012636b706819d0e2d782ae0e7e0a29997 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 4 Nov 2024 14:26:49 +0200 Subject: [PATCH] Suppress unreachable code warning in boost::array overload of hash_append --- include/boost/hash2/hash_append.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/boost/hash2/hash_append.hpp b/include/boost/hash2/hash_append.hpp index 1f7a9b0..9a76227 100644 --- a/include/boost/hash2/hash_append.hpp +++ b/include/boost/hash2/hash_append.hpp @@ -261,6 +261,11 @@ template // boost::array (constant size, but not tuple-like) +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4702) // unreachable code +#endif + template BOOST_CXX14_CONSTEXPR void do_hash_append( Hash& h, Flavor const& f, boost::array const& v ) { if( v.size() == 0 ) @@ -274,6 +279,10 @@ template BOOST_CXX14_CONSTEXPR } } +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + // unordered containers (is_unordered_range implies is_range) template