Change BitfieldExtract to use a pointer to the bitfield member

This commit is contained in:
Pokechu22
2021-04-10 19:34:20 -07:00
parent e7f68cf850
commit 0f7c9ef767
8 changed files with 164 additions and 79 deletions

View File

@ -155,8 +155,8 @@ public:
constexpr T Value() const { return Value(std::is_signed<T>()); }
constexpr operator T() const { return Value(); }
constexpr std::size_t StartBit() const { return position; }
constexpr std::size_t NumBits() const { return bits; }
static constexpr std::size_t StartBit() { return position; }
static constexpr std::size_t NumBits() { return bits; }
private:
// Unsigned version of StorageType