static_assert(Digest::size() == 20,
"Increment version number if size of digest is changed.");
-static_assert(std::is_trivially_copyable<Digest>::value,
+static_assert(IS_TRIVIALLY_COPYABLE(Digest),
"Digest is expected to be trivially copyable.");
static_assert(
#ifdef HAVE_SYS_MMAN_H
# define INODE_CACHE_SUPPORTED
#endif
+
+// Workaround for missing std::is_trivially_copyable in GCC < 5.
+#if __GNUG__ && __GNUC__ < 5
+# define IS_TRIVIALLY_COPYABLE(T) __has_trivial_copy(T)
+#else
+# define IS_TRIVIALLY_COPYABLE(T) std::is_trivially_copyable<T>::value
+#endif