From 1cfbf16e320ca9bdadd9c24eb1d2d68b25369ba6 Mon Sep 17 00:00:00 2001 From: Pimyn Girgis Date: Tue, 2 Dec 2025 12:28:10 +0000 Subject: executor: update flatbuffers Update flatbuffers to v23.5.26, which matches the compiler version in the new env container. --- executor/_include/flatbuffers/array.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'executor/_include/flatbuffers/array.h') diff --git a/executor/_include/flatbuffers/array.h b/executor/_include/flatbuffers/array.h index d4b73fc9e..f4bfbf054 100644 --- a/executor/_include/flatbuffers/array.h +++ b/executor/_include/flatbuffers/array.h @@ -17,6 +17,9 @@ #ifndef FLATBUFFERS_ARRAY_H_ #define FLATBUFFERS_ARRAY_H_ +#include +#include + #include "flatbuffers/base.h" #include "flatbuffers/stl_emulation.h" #include "flatbuffers/vector.h" @@ -35,7 +38,7 @@ template class Array { public: typedef uint16_t size_type; typedef typename IndirectHelper::return_type return_type; - typedef VectorIterator const_iterator; + typedef VectorConstIterator const_iterator; typedef VectorReverseIterator const_reverse_iterator; // If T is a LE-scalar or a struct (!scalar_tag::value). @@ -156,11 +159,13 @@ template class Array { // Specialization for Array[struct] with access using Offset pointer. // This specialization used by idl_gen_text.cpp. -template class Array, length> { +template class OffsetT> +class Array, length> { static_assert(flatbuffers::is_same::value, "unexpected type T"); public: typedef const void *return_type; + typedef uint16_t size_type; const uint8_t *Data() const { return data_; } @@ -238,6 +243,14 @@ const Array &CastToArrayOfEnum(const T (&arr)[length]) { return *reinterpret_cast *>(arr); } +template +bool operator==(const Array &lhs, + const Array &rhs) noexcept { + return std::addressof(lhs) == std::addressof(rhs) || + (lhs.size() == rhs.size() && + std::memcmp(lhs.Data(), rhs.Data(), rhs.size() * sizeof(T)) == 0); +} + } // namespace flatbuffers #endif // FLATBUFFERS_ARRAY_H_ -- cgit mrf-deployment