C++: mini_reflect: Add DefaultTypeTable (#4614)
* mini_reflect: Add DefaultTypeTable Currently it's very easy to make a mistake when it comes to instantiating the TypeTable to print a buffer because it is not type safe. This will allow us to write safer cpp code: flatbuffers::FlatBufferToString(reinterpret_cast<const uint8_t *>(&t), decltype(t)::DefaultTypeTable()); * c++: mini_reflect: update generated code * Ensure types and names are set for mini_reflect * c++: mini_refelct: update unit tests with new typed TypeTable * Adding PR feedback of sylte and naming convention
Showing
- samples/monster_generated.h 12 additions, 6 deletionssamples/monster_generated.h
- src/idl_gen_cpp.cpp 18 additions, 9 deletionssrc/idl_gen_cpp.cpp
- tests/monster_test_generated.h 44 additions, 26 deletionstests/monster_test_generated.h
- tests/namespace_test/namespace_test1_generated.h 7 additions, 4 deletionstests/namespace_test/namespace_test1_generated.h
- tests/namespace_test/namespace_test2_generated.h 23 additions, 14 deletionstests/namespace_test/namespace_test2_generated.h
- tests/test.cpp 1 addition, 1 deletiontests/test.cpp
- tests/union_vector/union_vector_generated.h 14 additions, 8 deletionstests/union_vector/union_vector_generated.h
Loading
Please register or sign in to comment