aboutsummaryrefslogtreecommitdiff
path: root/src/compat.h
diff options
context:
space:
mode:
authorEvan Klitzke <evan@eklitzke.org>2018-02-26 18:45:57 -0800
committerEvan Klitzke <evan@eklitzke.org>2018-02-27 11:42:06 -0800
commitf0e7aa702095b22ba57a763c5c093e15d41586d1 (patch)
treee9acd6a0af2ab274264d5b2191984a9992c5b712 /src/compat.h
parent228b086b9a3de02b534474027353a80dead2c292 (diff)
downloadbitcoin-f0e7aa702095b22ba57a763c5c093e15d41586d1.tar.xz
Add new prevector benchmarks.
This prepares for a series of two additional commits which optimize prevector performance.
Diffstat (limited to 'src/compat.h')
-rw-r--r--src/compat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h
index aae84b1181..8a0f901304 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -10,6 +10,16 @@
#include <config/bitcoin-config.h>
#endif
+#include <type_traits>
+
+// GCC 4.8 is missing some C++11 type_traits,
+// https://www.gnu.org/software/gcc/gcc-5/changes.html
+#if defined(__GNUC__) && __GNUC__ < 5
+#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivial
+#else
+#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivially_constructible
+#endif
+
#ifdef WIN32
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT