diff options
Diffstat (limited to 'app/source/Cplt/Utils/Macros.hpp')
-rw-r--r-- | app/source/Cplt/Utils/Macros.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/source/Cplt/Utils/Macros.hpp b/app/source/Cplt/Utils/Macros.hpp new file mode 100644 index 0000000..6958ed1 --- /dev/null +++ b/app/source/Cplt/Utils/Macros.hpp @@ -0,0 +1,13 @@ +#pragma once + +#define STRINGIFY_IMPL(text) #text +#define STRINGIFY(text) STRINGIFY_IMPL(text) + +#define CONCAT_IMPL(a, b) a##b +#define CONCAT(a, b) CONCAT_IMPL(a, b) +#define CONCAT_3(a, b, c) CONCAT(a, CONCAT(b, c)) +#define CONCAT_4(a, b, c, d) CONCAT(CONCAT(a, b), CONCAT(c, d)) + +#define UNIQUE_NAME(prefix) CONCAT(prefix, __COUNTER__) +#define UNIQUE_NAME_LINE(prefix) CONCAT(prefix, __LINE__) +#define DISCARD UNIQUE_NAME(_discard) |