Copy data from a span with endian conversion. If this Array and the span overlap, the behavior is undefined.
| 104 | // Copy data from a span with endian conversion. |
| 105 | // If this Array and the span overlap, the behavior is undefined. |
| 106 | void CopyFromSpan(flatbuffers::span<const T, length> src) { |
| 107 | const auto p1 = reinterpret_cast<const uint8_t *>(src.data()); |
| 108 | const auto p2 = Data(); |
| 109 | FLATBUFFERS_ASSERT(!(p1 >= p2 && p1 < (p2 + length)) && |
| 110 | !(p2 >= p1 && p2 < (p1 + length))); |
| 111 | (void)p1; |
| 112 | (void)p2; |
| 113 | CopyFromSpanImpl(flatbuffers::bool_constant<is_span_observable>(), src); |
| 114 | } |
| 115 | |
| 116 | protected: |
| 117 | void MutateImpl(flatbuffers::true_type, uoffset_t i, const T &val) { |