diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-18 20:10:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-18 20:10:54 +0300 |
commit | a044c97c30d014b7b8db7d72b03dc48829e1099a (patch) | |
tree | c9f8e66d3980bc9fbffb76932a11d36316040b86 /src/enums/simpletypes | |
parent | 324aae21e0c920b53ccc12d14f2550fc2d95e083 (diff) | |
download | ManaVerse-a044c97c30d014b7b8db7d72b03dc48829e1099a.tar.gz ManaVerse-a044c97c30d014b7b8db7d72b03dc48829e1099a.tar.bz2 ManaVerse-a044c97c30d014b7b8db7d72b03dc48829e1099a.tar.xz ManaVerse-a044c97c30d014b7b8db7d72b03dc48829e1099a.zip |
Allow set type for strong typed enum with values.
Diffstat (limited to 'src/enums/simpletypes')
-rw-r--r-- | src/enums/simpletypes/enumdefines.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/enums/simpletypes/enumdefines.h b/src/enums/simpletypes/enumdefines.h index 4db9bbab6..a1b5401ff 100644 --- a/src/enums/simpletypes/enumdefines.h +++ b/src/enums/simpletypes/enumdefines.h @@ -26,6 +26,7 @@ #ifdef ADVGCC #define enumStart(name) enum class name +#define enumStartT(name, type) enum class name : type #define enumEnd(name) ; \ typedef name name##T @@ -36,6 +37,11 @@ { \ enum T +#define enumStartT(name, type) \ + namespace name \ + { \ + enum T + #define enumEnd(name) \ ;\ } \ |