Skip to content

Commit

Permalink
Suppress unreachable code warning in boost::array overload of hash_ap…
Browse files Browse the repository at this point in the history
…pend
  • Loading branch information
pdimov committed Nov 4, 2024
1 parent 628f1ce commit 6a00c70
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/boost/hash2/hash_append.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ template<class Hash, class Flavor, class T>

// boost::array (constant size, but not tuple-like)

#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable: 4702) // unreachable code
#endif

template<class Hash, class Flavor, class T, std::size_t N> BOOST_CXX14_CONSTEXPR void do_hash_append( Hash& h, Flavor const& f, boost::array<T, N> const& v )
{
if( v.size() == 0 )
Expand All @@ -274,6 +279,10 @@ template<class Hash, class Flavor, class T, std::size_t N> BOOST_CXX14_CONSTEXPR
}
}

#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif

// unordered containers (is_unordered_range implies is_range)

template<class Hash, class Flavor, class T>
Expand Down

0 comments on commit 6a00c70

Please sign in to comment.