Enable C++ 17 features for flatbuffers
Makes flatc convert flatbuffers into cpp 17 instead of pre cpp 11 so
that new cpp features can be used with flatbuffers. Removes a now
incorrect cast from offset vector of BaseType to offset vector of 8 bit ints.
Change-Id: I7af8eb0848a83318ce0977b237272269355c83a8
diff --git a/aos/flatbuffer_introspection_test.cc b/aos/flatbuffer_introspection_test.cc
index d830b34..cd005ce 100644
--- a/aos/flatbuffer_introspection_test.cc
+++ b/aos/flatbuffer_introspection_test.cc
@@ -304,8 +304,7 @@
{BaseType::UShort, BaseType::Obj, BaseType::UInt});
ConfigurationBuilder config_builder(builder);
- config_builder.add_vector_foo_enum(
- flatbuffers::Offset<flatbuffers::Vector<int8_t>>(enums.o));
+ config_builder.add_vector_foo_enum(enums);
builder.Finish(config_builder.Finish());
diff --git a/third_party/flatbuffers/build_defs.bzl b/third_party/flatbuffers/build_defs.bzl
index be7ed13..f9c06f8 100644
--- a/third_party/flatbuffers/build_defs.bzl
+++ b/third_party/flatbuffers/build_defs.bzl
@@ -20,6 +20,8 @@
"--gen-object-api",
"--gen-compare",
"--keep-prefix",
+ "--cpp-std",
+ "c++17",
"--gen-mutable",
"--reflect-names",
"--cpp-ptr-type flatbuffers::unique_ptr",