| 93 | // T should be a protobuf RepeatedField. |
| 94 | template <typename T> |
| 95 | inline absl::Span<const int64> AsInt64Slice(const T& repeated_field) { |
| 96 | using data_ty = |
| 97 | typename std::remove_reference<decltype(*repeated_field.data())>::type; |
| 98 | static_assert(std::is_integral<data_ty>::value && |
| 99 | std::is_signed<data_ty>::value && sizeof(data_ty) == 8, |
| 100 | "repeated_field.data() must return a pointer to a signed " |
| 101 | "64-bit integer type."); |
| 102 | return absl::Span<const int64>( |
| 103 | reinterpret_cast<const int64*>(repeated_field.data()), |
| 104 | repeated_field.size()); |
| 105 | } |
| 106 | template <typename T> |
| 107 | inline absl::Span<int64> AsInt64Slice(T* repeated_field) { |
| 108 | using data_ty = |
no test coverage detected