Fix build for external boost 1.56.0
[alexxy/gromacs.git] / src / gromacs / utility / basedefinitions.h
index faa4395328c4c3eaefabbf99dc4b2a2bf2e60ac2..4c554c5f8356080f43645b2337c72babf8a062c3 100644 (file)
@@ -207,4 +207,25 @@ typedef uint64_t gmx_uint64_t;
 #endif
 #endif
 
+#ifndef __has_feature
+/** For compatibility with non-clang compilers. */
+#define __has_feature(x) 0
+#endif
+
+/*! \def gmx_noreturn
+ * \brief
+ * Indicate that a function is not expected to return.
+ *
+ */
+#ifndef gmx_noreturn
+#if defined(__GNUC__) || __has_feature(attribute_analyzer_noreturn)
+#define gmx_noreturn __attribute__((noreturn))
+#elif defined (_MSC_VER)
+#define gmx_noreturn __declspec(noreturn)
+#else
+#define gmx_noreturn
+#endif
+#endif
+
+
 #endif