| 32 | |
| 33 | template <class Value> |
| 34 | struct TValues { |
| 35 | using TSelector = TValueSelector<Value>; |
| 36 | |
| 37 | using TStored = typename TSelector::TStored; |
| 38 | using TValueRef = typename TSelector::TValueRef; |
| 39 | using TValuePtr = typename TSelector::TValuePtr; |
| 40 | |
| 41 | using TData = const TValuePtr*; |
| 42 | |
| 43 | static inline TValuePtr Get(TData table, size_t index) { |
| 44 | static_assert(std::is_pointer<TData>::value, "expect std::is_pointer<TData>::value"); |
| 45 | return table[index]; |
| 46 | } |
| 47 | |
| 48 | static inline TValueRef Get(TValuePtr val) { |
| 49 | return TSelector::Get(val); |
| 50 | } |
| 51 | }; |
| 52 | |
| 53 | template <int Shift, class TChild> |
| 54 | struct TSubtable { |