mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-16 17:22:21 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user