Skip to content

Commit 7bad78c

Browse files
committed
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.
1 parent b60f4e3 commit 7bad78c

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

src/bench/prevector.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <compat.h>
65
#include <prevector.h>
76
#include <serialize.h>
87
#include <streams.h>
8+
#include <type_traits>
99

1010
#include <bench/bench.h>
1111

12+
// GCC 4.8 is missing some C++11 type_traits,
13+
// https://www.gnu.org/software/gcc/gcc-5/changes.html
14+
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5
15+
#define IS_TRIVIALLY_CONSTRUCTIBLE std::has_trivial_default_constructor
16+
#else
17+
#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivially_default_constructible
18+
#endif
19+
1220
struct nontrivial_t {
1321
int x;
1422
nontrivial_t() :x(-1) {}

src/compat.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@
1010
#include <config/bitcoin-config.h>
1111
#endif
1212

13-
#include <type_traits>
14-
15-
// GCC 4.8 is missing some C++11 type_traits,
16-
// https://www.gnu.org/software/gcc/gcc-5/changes.html
17-
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5
18-
#define IS_TRIVIALLY_CONSTRUCTIBLE std::has_trivial_default_constructor
19-
#else
20-
#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivially_default_constructible
21-
#endif
22-
2313
#ifdef WIN32
2414
#ifdef _WIN32_WINNT
2515
#undef _WIN32_WINNT

src/prevector.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#include <iterator>
1616
#include <type_traits>
1717

18-
#include <compat.h>
19-
2018
#pragma pack(push, 1)
2119
/** Implements a drop-in replacement for std::vector<T> which stores up to N
2220
* elements directly (without heap allocation). The types Size and Diff are

0 commit comments

Comments
 (0)