Skip to content

Commit

Permalink
🎨 added const guards to bitspan
Browse files Browse the repository at this point in the history
  • Loading branch information
lamarrr committed Dec 5, 2024
1 parent ec6c360 commit 331546f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ashura/std/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ struct BitSpan
return ash::get_bit(repr_, index);
}

constexpr void set(usize index, bool value) const
constexpr void set(usize index, bool value) const requires (NonConst<R>)
{
ash::assign_bit(repr_, index, value);
}
Expand All @@ -1805,17 +1805,17 @@ struct BitSpan
return ash::get_bit(repr_, index);
}

constexpr bool set_bit(usize index) const
constexpr bool set_bit(usize index) const requires (NonConst<R>)
{
return ash::set_bit(repr_, index);
}

constexpr bool clear_bit(usize index) const
constexpr bool clear_bit(usize index) const requires (NonConst<R>)
{
return ash::clear_bit(repr_, index);
}

constexpr void flip_bit(usize index) const
constexpr void flip_bit(usize index) const requires (NonConst<R>)
{
ash::flip_bit(repr_, index);
}
Expand Down

0 comments on commit 331546f

Please sign in to comment.