mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 12:21:23 +00:00
Add cpp_vec_type attribute for object API vector customization
Mirrors cpp_str_type and cpp_ptr_type: a per-field cpp_vec_type attribute lets users substitute any std::vector-compatible container in generated T-structs, and --cpp-vec-type sets the global default. NativeVector() resolves the attribute (falling back to the global option, then std::vector). Changes applied to GenTypeNative, GenMember, GenParam (CreateDirect), and the CreateVectorOfStrings fast-path guard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -383,6 +383,11 @@ flatc(
|
||||
schema="native_type_test.fbs",
|
||||
)
|
||||
|
||||
flatc(
|
||||
["--cpp", "--gen-compare", "--gen-mutable", "--gen-object-api", "--reflect-names"],
|
||||
schema="cpp_vec_type_test.fbs",
|
||||
)
|
||||
|
||||
flatc(
|
||||
[
|
||||
"--cpp",
|
||||
|
||||
Reference in New Issue
Block a user