Copy data from a span with endian conversion. If this Array and the span overlap, the behavior is undefined.
| 555 | // Copy data from a span with endian conversion. |
| 556 | // If this Array and the span overlap, the behavior is undefined. |
| 557 | void CopyFromSpan(flatbuffers::span<const T, length> src) { |
| 558 | const auto p1 = reinterpret_cast<const uint8_t *>(src.data()); |
| 559 | const auto p2 = Data(); |
| 560 | FLATBUFFERS_ASSERT(!(p1 >= p2 && p1 < (p2 + length)) && |
| 561 | !(p2 >= p1 && p2 < (p1 + length))); |
| 562 | (void)p1; |
| 563 | (void)p2; |
| 564 | CopyFromSpanImpl(flatbuffers::bool_constant<is_span_observable>(), src); |
| 565 | } |
| 566 | |
| 567 | protected: |
| 568 | void MutateImpl(flatbuffers::true_type, uoffset_t i, const T &val) { |