Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
  • Loading branch information
azimafroozeh committed Sep 11, 2024
1 parent 57f02f1 commit df227ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/fls/utl/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ struct TYPE_C<HEAD_T, TAIL_T...> {
\---------------------------------------------------------------------------------------------------------------------*/
template <uint64_t N>
struct Max {
enum : uint64_t { VALUE = (1UL << N) - 1UL };
static constexpr uint64_t VALUE = (1UL << N) - 1UL;
};

static_assert(Max<4>::VALUE == 15);
static_assert(Max<32>::VALUE == 4294967295, "2 ^ 32 - 1");

Expand Down

0 comments on commit df227ce

Please sign in to comment.