0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-09 13:38:55 +02:00

ircd::util::bitset: Fix assertion made under constant evaluation.

This commit is contained in:
Jason Volk 2023-03-10 11:35:48 -08:00
parent 2147d00dd4
commit cefcc75943

View file

@ -152,7 +152,9 @@ const
{
constexpr auto max(words - 1);
const auto off(pos / 8);
if(!__builtin_is_constant_evaluated())
assert(off <= max);
return std::min(off, max);
}