mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-22 20:58:53 +00:00
Generate a C++ function for EnumValues{{ENUM_NAME}} (#4337)
* enables "for each" logic on enumeration types
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
01c50d57a6
commit
dadd1a926e
@@ -21,6 +21,15 @@ enum EnumInNestedNS {
|
||||
EnumInNestedNS_MAX = EnumInNestedNS_C
|
||||
};
|
||||
|
||||
inline EnumInNestedNS (&EnumValuesEnumInNestedNS())[3] {
|
||||
static EnumInNestedNS values[] = {
|
||||
EnumInNestedNS_A,
|
||||
EnumInNestedNS_B,
|
||||
EnumInNestedNS_C
|
||||
};
|
||||
return values;
|
||||
}
|
||||
|
||||
inline const char **EnumNamesEnumInNestedNS() {
|
||||
static const char *names[] = {
|
||||
"A",
|
||||
|
||||
Reference in New Issue
Block a user