Skip to content

Commit

Permalink
Avoid tautological compare warn by compilers w/o vector constexpr.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed May 25, 2024
1 parent 3e7b5f9 commit a959e76
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/bitcoin/system/impl/hash/sha/algorithm.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -1278,11 +1278,15 @@ merkle_hash(digests_t& digests) NOEXCEPT
{
static_assert(is_same_type<state_t, chunk_t>);

// Avoid tautological warning (std::is_constant_evaluated() always false).
#if defined(HAVE_VECTOR_CONSTEXPR)
if (std::is_constant_evaluated())
{
merkle_hash_(digests);
}
else if constexpr (vectorization)
else
#endif
if constexpr (vectorization)
{
merkle_hash_dispatch(digests);
}
Expand Down

0 comments on commit a959e76

Please sign in to comment.