Remove span ConstIterator/cbegin()/cend(). (#7295)

std::span lacks these; make  the flatbuffers STL emulation and tests
match.  This fixes a compile error in C++20 mode when using std::span.

Bug: chromium:1284275
This commit is contained in:
pkasting
2022-05-10 13:53:38 -07:00
committed by GitHub
parent 385dddc66a
commit 0fe13cb28c
2 changed files with 7 additions and 11 deletions

View File

@@ -366,13 +366,9 @@ class span FLATBUFFERS_FINAL_CLASS {
#if !defined(FLATBUFFERS_SPAN_MINIMAL)
using Iterator = internal::SpanIterator<T>;
using ConstIterator = internal::SpanIterator<const T>;
Iterator begin() const { return Iterator(data()); }
Iterator end() const { return Iterator(data() + size()); }
ConstIterator cbegin() const { return ConstIterator(data()); }
ConstIterator cend() const { return ConstIterator(data() + size()); }
#endif
// Returns a reference to the idx-th element of the sequence.