mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-18 07:04:27 +00:00
Merge branch 'master' of https://github.com/google/flatbuffers
This commit is contained in:
@@ -76,6 +76,22 @@ inline const char **EnumNamesAny() {
|
||||
|
||||
inline const char *EnumNameAny(Any e) { return EnumNamesAny()[static_cast<int>(e)]; }
|
||||
|
||||
template<typename T> struct AnyTraits {
|
||||
static const Any enum_value = Any_NONE;
|
||||
};
|
||||
|
||||
template<> struct AnyTraits<Monster> {
|
||||
static const Any enum_value = Any_Monster;
|
||||
};
|
||||
|
||||
template<> struct AnyTraits<TestSimpleTableWithEnum> {
|
||||
static const Any enum_value = Any_TestSimpleTableWithEnum;
|
||||
};
|
||||
|
||||
template<> struct AnyTraits<MyGame::Example2::Monster> {
|
||||
static const Any enum_value = Any_MyGame_Example2_Monster;
|
||||
};
|
||||
|
||||
inline bool VerifyAny(flatbuffers::Verifier &verifier, const void *union_obj, Any type);
|
||||
|
||||
MANUALLY_ALIGNED_STRUCT(2) Test FLATBUFFERS_FINAL_CLASS {
|
||||
|
||||
Reference in New Issue
Block a user