aboutsummaryrefslogtreecommitdiff
path: root/src/bench
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2018-11-13 04:15:09 -0500
committerBen Woosley <ben.woosley@gmail.com>2018-11-14 12:19:04 -0500
commit7bad78c2c83d73b7e0518f3e1b835f0157b80ec6 (patch)
treee07aa7895ccd6b34ec07fbe7f5fc12a161bd49ca /src/bench
parentb60f4e3f095124a71394d6b2aafaedca2be6c1ad (diff)
downloadbitcoin-7bad78c2c83d73b7e0518f3e1b835f0157b80ec6.tar.xz
Drop defunct IS_TRIVIALLY_CONSTRUCTIBLE handling from prevector.h
It's now only referenced from the bench, so leave it there. This allows us to drop the associated includes as well.
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/prevector.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bench/prevector.cpp b/src/bench/prevector.cpp
index 8cc404b9e2..00e5d7e7a0 100644
--- a/src/bench/prevector.cpp
+++ b/src/bench/prevector.cpp
@@ -2,13 +2,21 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include <compat.h>
#include <prevector.h>
#include <serialize.h>
#include <streams.h>
+#include <type_traits>
#include <bench/bench.h>
+// GCC 4.8 is missing some C++11 type_traits,
+// https://www.gnu.org/software/gcc/gcc-5/changes.html
+#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5
+#define IS_TRIVIALLY_CONSTRUCTIBLE std::has_trivial_default_constructor
+#else
+#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivially_default_constructible
+#endif
+
struct nontrivial_t {
int x;
nontrivial_t() :x(-1) {}