• Frank Benkstein's avatar
    make flatbuffers::IsFieldPresent safer (#4988) · ca417426
    Frank Benkstein authored
    Give the vtable offset enum inside each table the name
    "FlatBuffersVTableOffset" and base type voffset_t so it can be used as a
    dependent type in IsFieldPresent. This makes that function slightly
    safer since it prevents calling it with arbitrary, non-table types.
    Now, the only way to use IsFieldPresent incorrectly is to create your
    own type which does not inherit from flatbuffers::Table but has a
    dependent voffset convertible type "FlatBuffersVTableOffset".
    ca417426
monster_test_generated.h 101 KB