Removal of support for FLATBUFFERS_CPP98_STL (#6918)

* Removal of support for FLATBUFFERS_CPP98_STL

For context, see https://github.com/google/flatbuffers/issues/6704

* Also removed vector_data
This commit is contained in:
Wouter van Oortmerssen
2021-11-12 14:01:11 -08:00
committed by GitHub
parent 3fab0c6ee4
commit 6748c373be
29 changed files with 119 additions and 545 deletions

View File

@@ -45,9 +45,6 @@ class DetachedBuffer {
cur_(cur),
size_(sz) {}
// clang-format off
#if !defined(FLATBUFFERS_CPP98_STL)
// clang-format on
DetachedBuffer(DetachedBuffer &&other)
: allocator_(other.allocator_),
own_allocator_(other.own_allocator_),
@@ -57,13 +54,7 @@ class DetachedBuffer {
size_(other.size_) {
other.reset();
}
// clang-format off
#endif // !defined(FLATBUFFERS_CPP98_STL)
// clang-format on
// clang-format off
#if !defined(FLATBUFFERS_CPP98_STL)
// clang-format on
DetachedBuffer &operator=(DetachedBuffer &&other) {
if (this == &other) return *this;
@@ -80,9 +71,6 @@ class DetachedBuffer {
return *this;
}
// clang-format off
#endif // !defined(FLATBUFFERS_CPP98_STL)
// clang-format on
~DetachedBuffer() { destroy(); }
@@ -92,16 +80,10 @@ class DetachedBuffer {
size_t size() const { return size_; }
// clang-format off
#if !defined(FLATBUFFERS_CPP98_STL)
// clang-format on
// These may change access mode, leave these at end of public section
FLATBUFFERS_DELETE_FUNC(DetachedBuffer(const DetachedBuffer &other));
FLATBUFFERS_DELETE_FUNC(
DetachedBuffer &operator=(const DetachedBuffer &other));
// clang-format off
#endif // !defined(FLATBUFFERS_CPP98_STL)
// clang-format on
protected:
Allocator *allocator_;
@@ -129,4 +111,4 @@ class DetachedBuffer {
} // namespace flatbuffers
#endif // FLATBUFFERS_DETACHED_BUFFER_H_
#endif // FLATBUFFERS_DETACHED_BUFFER_H_