Fix --gen-compare to not generate comparators for native types. (#8681)

Per the definition of --gen-compare: only generate comparators for object API
generated structs. Types annoated with native_type must define their own
comparators if `--gen-compare` is enabled.

Also enables --gen-compare for native_type_test and fixes the test by adding a
comparator for the Native::Vector3D type.
This commit is contained in:
cosmith-nvidia
2025-11-04 16:43:00 -08:00
committed by GitHub
parent 5fe90a9160
commit 4173b84d4b
5 changed files with 49 additions and 5 deletions

View File

@@ -355,7 +355,7 @@ flatc(
)
flatc(
["--cpp", "--gen-mutable", "--gen-object-api", "--reflect-names"],
["--cpp", "--gen-compare", "--gen-mutable", "--gen-object-api", "--reflect-names"],
schema="native_type_test.fbs",
)