Merge branch 'master' into simulator
[platform/upstream/iotivity.git] / resource / c_common / platform_features.h
index 2fdaded..8f39e19 100644 (file)
     #define SUPPORTS_DEFAULT_CTOR
 #endif
 
+#if (__STDC_VERSION__ >= 201112L)
+    #include <stdassert.h>
+    #define OC_STATIC_ASSERT(condition, msg) static_assert(condition, msg)
+#else
+    #define OC_STATIC_ASSERT(condition, msg) ((void)sizeof(char[2*!!(condition) - 1]))
+#endif
+
 #endif