| 200 | // Read/write a native endian array as little endian |
| 201 | template <typename T, size_t N> |
| 202 | struct Writer { |
| 203 | std::array<T, N>* native_array; |
| 204 | |
| 205 | explicit Writer(std::array<T, N>* native_array) : native_array(native_array) {} |
| 206 | |
| 207 | const T& operator[](size_t i) const { |
| 208 | return (*native_array)[ARROW_LITTLE_ENDIAN ? i : N - 1 - i]; |
| 209 | } |
| 210 | T& operator[](size_t i) { return (*native_array)[ARROW_LITTLE_ENDIAN ? i : N - 1 - i]; } |
| 211 | }; |
| 212 | |
| 213 | } // namespace detail |
| 214 |
no outgoing calls
no test coverage detected