We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6b598e6 + 6144d52 commit a30b40fCopy full SHA for a30b40f
src/portab.h
@@ -52,13 +52,15 @@
52
#endif
53
54
55
-// In C++11 UNUSED(x) is explicitly provided
+// http://stackoverflow.com/a/4030983/211160
56
+// Use to indicate a variable is being intentionally not referred to (which
57
+// usually generates a compiler warning)
58
+#ifndef UNUSED
59
+#define UNUSED(x) ((void)(true ? 0 : ((x), void(), 0)))
60
+#endif
61
+
62
63
#if __cplusplus <= 199711L
- #if defined (_MSC_VER)
- #define UNUSED(x) (void) (x);
- #else
- #define UNUSED(x) (void) (sizeof((x), 0))
- #endif
64
#ifndef __clang__
65
#define nullptr NULL
66
0 commit comments