mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 17:22:03 +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:
@@ -240,6 +240,7 @@ set(FlatBuffers_Tests_SRCS
|
||||
tests/vector_table_naked_ptr_test.cpp
|
||||
tests/native_type_test_impl.h
|
||||
tests/native_type_test_impl.cpp
|
||||
tests/cpp_vec_type_test_impl.h
|
||||
tests/alignment_test.h
|
||||
tests/alignment_test.cpp
|
||||
tests/64bit/offset64_test.h
|
||||
@@ -554,6 +555,7 @@ if(FLATBUFFERS_BUILD_TESTS)
|
||||
compile_schema_for_test(tests/arrays_test.fbs "${FLATC_OPT_SCOPED_ENUMS}")
|
||||
compile_schema_for_test(tests/native_inline_table_test.fbs "${FLATC_OPT_COMP}")
|
||||
compile_schema_for_test(tests/native_type_test.fbs "${FLATC_OPT_COMP}")
|
||||
compile_schema_for_test(tests/cpp_vec_type_test.fbs "${FLATC_OPT_COMP}")
|
||||
compile_schema_for_test(tests/key_field/key_field_sample.fbs "${FLATC_OPT_COMP}")
|
||||
compile_schema_for_test(tests/64bit/test_64bit.fbs "${FLATC_OPT_COMP};--bfbs-gen-embed")
|
||||
compile_schema_for_test(tests/64bit/evolution/v1.fbs "${FLATC_OPT_COMP}")
|
||||
|
||||
Reference in New Issue
Block a user