Implement META_ASSERT with static_assert if the compiler supports it.

TRAC #23948

Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
diff --git a/src/common/debug.h b/src/common/debug.h
index 3a45c05..f425faa 100644
--- a/src/common/debug.h
+++ b/src/common/debug.h
@@ -114,6 +114,11 @@
 #endif
 
 // A macro functioning as a compile-time assert to validate constant conditions
-#define META_ASSERT(condition) typedef int COMPILE_TIME_ASSERT_##__LINE__[static_cast<bool>(condition)?1:-1]
+#if defined(_MSC_VER) && _MSC_VER >= 1600
+#define META_ASSERT_MSG(condition, msg) static_assert(condition, msg)
+#else
+#define META_ASSERT_MSG(condition, msg) typedef int COMPILE_TIME_ASSERT_##__LINE__[static_cast<bool>(condition)?1:-1]
+#endif
+#define META_ASSERT(condition) META_ASSERT_MSG(condition, "compile time assertion failed.")
 
 #endif   // COMMON_DEBUG_H_