diff options
| author | WormHeamer | 2025-11-25 18:47:28 -0500 |
|---|---|---|
| committer | WormHeamer | 2025-11-25 18:47:28 -0500 |
| commit | f7078d34566fe152e876878e05e8b1e3644cce88 (patch) | |
| tree | b133b274ea5892630b248ea563aaeaa35643f13a | |
| parent | e3348515b9bbbea01b11298bb23276d7706c5c20 (diff) | |
add TYPEOF
| -rw-r--r-- | wrmr.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -58,4 +58,10 @@ typedef uintptr_t uptr; # define ASSUME(...) do if (!(__VA_ARGS__)) UNREACHABLE_MSG("assumption failed: " #__VA_ARGS__); while(0); #endif +#if __STDC_VERSION__ >= 202311L +# define TYPEOF(...) typeof(__VA_ARGS__) +#else +# define TYPEOF(...) __typeof__(__VA_ARGS__) +#endif + #endif |
