Skip to content

Commit 7dfb3ea

Browse files
committed
include/swift/Basic: fix deprecation warnings
These are deprecation warnings ``` include/swift/Basic/type_traits.h:49:29: warning: builtin __has_trivial_constructor is deprecated; use __is_trivially_constructible instead [-Wdeprecated-builtins] static const bool value = __has_trivial_constructor(T); ^ include/swift/Basic/type_traits.h:61:29: warning: builtin __has_trivial_destructor is deprecated; use __is_trivially_destructible instead [-Wdeprecated-builtins] static const bool value = __has_trivial_destructor(T); ^ 2 warnings generated. ```
1 parent 25c9a6a commit 7dfb3ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/swift/Basic/type_traits.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ struct IsTriviallyConstructible {
4545
#if defined(_LIBCPP_VERSION) || SWIFT_COMPILER_IS_MSVC
4646
// libc++ and MSVC implement is_trivially_constructible.
4747
static const bool value = std::is_trivially_constructible<T>::value;
48-
#elif __has_feature(has_trivial_constructor) || __GNUC__ >= 5
49-
static const bool value = __has_trivial_constructor(T);
48+
#elif __has_feature(__is_trivially_constructible) || __GNUC__ >= 5
49+
static const bool value = __is_trivially_constructible(T);
5050
#else
5151
# error "Not implemented"
5252
#endif
@@ -57,8 +57,8 @@ struct IsTriviallyDestructible {
5757
#if defined(_LIBCPP_VERSION) || SWIFT_COMPILER_IS_MSVC
5858
// libc++ and MSVC implement is_trivially_destructible.
5959
static const bool value = std::is_trivially_destructible<T>::value;
60-
#elif __has_feature(has_trivial_destructor) || __GNUC__ >= 5
61-
static const bool value = __has_trivial_destructor(T);
60+
#elif __has_feature(__is_trivially_destructible) || __GNUC__ >= 5
61+
static const bool value = __is_trivially_destructible(T);
6262
#else
6363
# error "Not implemented"
6464
#endif

0 commit comments

Comments
 (0)