File tree Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 9
9
10
10
#include < bench/bench.h>
11
11
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
-
20
12
struct nontrivial_t {
21
13
int x;
22
14
nontrivial_t () :x(-1 ) {}
23
15
SERIALIZE_METHODS (nontrivial_t , obj) { READWRITE (obj.x ); }
24
16
};
25
- static_assert (!IS_TRIVIALLY_CONSTRUCTIBLE <nontrivial_t >::value,
17
+ static_assert (!std::is_trivially_default_constructible <nontrivial_t >::value,
26
18
" expected nontrivial_t to not be trivially constructible" );
27
19
28
20
typedef unsigned char trivial_t ;
29
- static_assert (IS_TRIVIALLY_CONSTRUCTIBLE <trivial_t >::value,
21
+ static_assert (std::is_trivially_default_constructible <trivial_t >::value,
30
22
" expected trivial_t to be trivially constructible" );
31
23
32
24
template <typename T>
Original file line number Diff line number Diff line change 14
14
#if __has_builtin(__builtin_add_overflow)
15
15
#define HAVE_BUILTIN_ADD_OVERFLOW
16
16
#endif
17
- #elif defined(__GNUC__) && (__GNUC__ >= 5)
17
+ #elif defined(__GNUC__)
18
18
#define HAVE_BUILTIN_ADD_OVERFLOW
19
19
#endif
20
20
Original file line number Diff line number Diff line change 14
14
#if __has_builtin(__builtin_mul_overflow)
15
15
#define HAVE_BUILTIN_MUL_OVERFLOW
16
16
#endif
17
- #elif defined(__GNUC__) && (__GNUC__ >= 5)
17
+ #elif defined(__GNUC__)
18
18
#define HAVE_BUILTIN_MUL_OVERFLOW
19
19
#endif
20
20
You can’t perform that action at this time.
0 commit comments