| 66 | } |
| 67 | |
| 68 | struct Slice { |
| 69 | const Array* array_; |
| 70 | int64_t offset_, length_; |
| 71 | |
| 72 | bool operator==(const Slice& other) const { |
| 73 | return length_ == other.length_ && |
| 74 | array_->RangeEquals(offset_, offset_ + length_, other.offset_, *other.array_); |
| 75 | } |
| 76 | bool operator!=(const Slice& other) const { return !(*this == other); } |
| 77 | }; |
| 78 | |
| 79 | template <typename ArrayType, typename T = typename ArrayType::TypeClass, |
| 80 | typename = enable_if_list_like<T>> |