Skip to content

Commit

Permalink
Guard use of std::numeric_limits<word128>::max()
Browse files Browse the repository at this point in the history
Apple Clang has the problem. Limit the work around to just Apple Clang.
  • Loading branch information
noloader committed Jun 23, 2023
1 parent 12c6a90 commit 3b1cf30
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,11 @@ inline word128 NumericLimitsMin()
template<>
inline word128 NumericLimitsMax()
{
#if defined(CRYPTOPP_APPLE_CLANG_VERSION)
return (static_cast<word128>(LWORD_MAX) << 64U) | LWORD_MAX;
#else
return (std::numeric_limits<word128>::max)();
#endif
}
#endif

Expand Down

1 comment on commit 3b1cf30

@noloader
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also see Issue 364.

Please sign in to comment.