diff --git a/src/storm/utility/bitoperations.h b/src/storm/utility/bitoperations.h index 931f3e82d..e12ff6d40 100644 --- a/src/storm/utility/bitoperations.h +++ b/src/storm/utility/bitoperations.h @@ -1,4 +1,6 @@ #pragma once +#include +#include "storm/utility/macros.h" inline size_t smallestIntWithNBitsSet(size_t n) { static_assert(sizeof(size_t) == 8, "size_t has wrong size."); @@ -11,5 +13,5 @@ inline size_t nextBitPermutation(size_t v) { if (v==0) return static_cast(0); // From https://graphics.stanford.edu/~seander/bithacks.html#NextBitPermutation size_t t = (v | (v - 1)) + 1; - return t | ((((t & -t) / (v & -v)) >> 1) - 1); + return t | ((((t & -t) / (v & -v)) >> 1) - 1); }