mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 19:22:17 +01:00
Make IS_TRIVIALLY_CONSTRUCTIBLE consistent on GCC < 5
std::is_trivially_constructible<T> is equivalent to std::is_trivially_default_constructible<T> std::has_trivial_default_constructor<T> is the GCC < 5 name for std::is_trivially_default_constructible<T> std::is_trivial was also used when compiling with clang, due to clang's use of __GNUC__. Test __clang__ to target the intended implementations.
This commit is contained in:
@@ -14,10 +14,10 @@
|
|||||||
|
|
||||||
// GCC 4.8 is missing some C++11 type_traits,
|
// GCC 4.8 is missing some C++11 type_traits,
|
||||||
// https://www.gnu.org/software/gcc/gcc-5/changes.html
|
// https://www.gnu.org/software/gcc/gcc-5/changes.html
|
||||||
#if defined(__GNUC__) && __GNUC__ < 5
|
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5
|
||||||
#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivial
|
#define IS_TRIVIALLY_CONSTRUCTIBLE std::has_trivial_default_constructor
|
||||||
#else
|
#else
|
||||||
#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivially_constructible
|
#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivially_default_constructible
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|||||||
Reference in New Issue
Block a user