| 473 | /// @tparam T arrow::util::Float16 or value_type (uint16_t) |
| 474 | template <typename T = BaseClass::value_type> |
| 475 | T GetValue(int64_t index) const { |
| 476 | static_assert(std::is_same_v<T, BaseClass::value_type> || |
| 477 | std::is_same_v<T, arrow::util::Float16>); |
| 478 | if constexpr (std::is_same_v<T, BaseClass::value_type>) { |
| 479 | return BaseClass::GetValue(index); |
| 480 | } else { |
| 481 | return Float16::FromBits(BaseClass::GetValue(index)); |
| 482 | } |
| 483 | } |
| 484 | }; |
| 485 | |
| 486 | /// @} |