| 1259 | // Returns underlying value from enum value. |
| 1260 | template <typename E> |
| 1261 | [[nodiscard]] constexpr auto enum_underlying(E value) noexcept -> underlying_type_t<E> { |
| 1262 | return static_cast<underlying_type_t<E>>(value); |
| 1263 | } |
| 1264 | |
| 1265 | // Returns index in enum values from enum value. |
| 1266 | // Returns optional with index. |