mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 05:47:36 +00:00
[C++] Add option to not generate direct copy methods. (#6166)
* Add option to not generate direct copy methods. The direct copy methods generated by flatc utilize std::vector which isn't allowed on some embedded systems. Permit users of the compiler to not generate these methods so they don't have to be stubbed out. * Update docs for no-cpp-direct-copy option.
This commit is contained in:
@@ -538,6 +538,7 @@ struct IDLOptions {
|
||||
std::string cpp_object_api_pointer_type;
|
||||
std::string cpp_object_api_string_type;
|
||||
bool cpp_object_api_string_flexible_constructor;
|
||||
bool cpp_direct_copy;
|
||||
bool gen_nullable;
|
||||
bool java_checkerframework;
|
||||
bool gen_generated;
|
||||
@@ -632,6 +633,7 @@ struct IDLOptions {
|
||||
gen_compare(false),
|
||||
cpp_object_api_pointer_type("std::unique_ptr"),
|
||||
cpp_object_api_string_flexible_constructor(false),
|
||||
cpp_direct_copy(true),
|
||||
gen_nullable(false),
|
||||
java_checkerframework(false),
|
||||
gen_generated(false),
|
||||
|
||||
Reference in New Issue
Block a user