better fields access
This commit is contained in:
@@ -40,6 +40,11 @@ class BitField {
|
||||
return std::get<FIndex>(this->GetFields()).GetValue();
|
||||
}
|
||||
|
||||
template <std::size_t FIndex>
|
||||
const auto& GetField() const {
|
||||
return std::get<FIndex>(this->GetFields()).GetValue();
|
||||
}
|
||||
|
||||
private:
|
||||
template <int IOffset, typename... T, std::enable_if_t<IOffset >= sizeof...(T), bool> = true>
|
||||
void Apply(const std::tuple<T...>& args) {}
|
||||
|
||||
Reference in New Issue
Block a user