@@ -33,7 +33,7 @@ struct IsTriviallyCopyable {
33
33
#if _LIBCPP_VERSION || SWIFT_COMPILER_IS_MSVC
34
34
// libc++ and MSVC implement is_trivially_copyable.
35
35
static const bool value = std::is_trivially_copyable<T>::value;
36
- #elif __has_feature(is_trivially_copyable)
36
+ #elif __has_feature(is_trivially_copyable) || __GNUC__ >= 5
37
37
static const bool value = __is_trivially_copyable(T);
38
38
#else
39
39
# error "Not implemented"
@@ -45,7 +45,7 @@ struct IsTriviallyConstructible {
45
45
#if _LIBCPP_VERSION || SWIFT_COMPILER_IS_MSVC
46
46
// libc++ and MSVC implement is_trivially_constructible.
47
47
static const bool value = std::is_trivially_constructible<T>::value;
48
- #elif __has_feature(has_trivial_constructor)
48
+ #elif __has_feature(has_trivial_constructor) || __GNUC__ >= 5
49
49
static const bool value = __has_trivial_constructor(T);
50
50
#else
51
51
# error "Not implemented"
@@ -57,7 +57,7 @@ struct IsTriviallyDestructible {
57
57
#if _LIBCPP_VERSION || SWIFT_COMPILER_IS_MSVC
58
58
// libc++ and MSVC implement is_trivially_destructible.
59
59
static const bool value = std::is_trivially_destructible<T>::value;
60
- #elif __has_feature(has_trivial_destructor)
60
+ #elif __has_feature(has_trivial_destructor) || __GNUC__ >= 5
61
61
static const bool value = __has_trivial_destructor(T);
62
62
#else
63
63
# error "Not implemented"
0 commit comments