Add support for using array of scalar as key field in Cpp (#7623)
authorWen Sun <30698014+sunwen18@users.noreply.github.com>
Fri, 18 Nov 2022 19:04:46 +0000 (11:04 -0800)
committerGitHub <noreply@github.com>
Fri, 18 Nov 2022 19:04:46 +0000 (11:04 -0800)
commiteb1abb51ea856a7b118c0d6a47624470caec0463
tree602fae1ea08eb46947b040845c93fa8ad1cda5f8
parent1fa60910005556cf9f9f67d89412beb7e918fe57
Add support for using array of scalar as key field in Cpp (#7623)

* add support for using array of scalar as key field

* update cmakelist and test.cpp to include the tests

* update bazel rule

* address comments

* clang format

* delete comment

* delete comment

* address the rest of the commnets

* address comments

* update naming in test file

* format build file

* buildifier

* make keycomparelessthan call keycomparewithvalue

* update to use flatbuffer array instead of raw pointer

* clang

* format

* revert format

* revert format

* update

* run generate_code.py

* run code generator

* revert changes by generate_code.py

* fist run make flatc and then run generate_code.py

Co-authored-by: Wen Sun <sunwen@google.com>
15 files changed:
CMakeLists.txt
include/flatbuffers/reflection_generated.h
src/idl_gen_cpp.cpp
src/idl_parser.cpp
tests/BUILD.bazel
tests/cpp17/generated_cpp17/monster_test_generated.h
tests/key_field/key_field_sample.fbs [new file with mode: 0644]
tests/key_field/key_field_sample_generated.h [new file with mode: 0644]
tests/key_field_test.cpp [new file with mode: 0644]
tests/key_field_test.h [new file with mode: 0644]
tests/monster_test_generated.h
tests/monster_test_suffix/ext_only/monster_test_generated.hpp
tests/monster_test_suffix/filesuffix_only/monster_test_suffix.h
tests/monster_test_suffix/monster_test_suffix.hpp
tests/test.cpp