Skip to content

Commit 88cc42c

Browse files
authored
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 88cc42c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/Basic/type_traits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct IsTriviallyConstructible {
4646
// libc++ and MSVC implement is_trivially_constructible.
4747
static const bool value = std::is_trivially_constructible<T>::value;
4848
#elif __has_feature(has_trivial_constructor) || __GNUC__ >= 5
49-
static const bool value = __has_trivial_constructor(T);
49+
static const bool value = __is_trivially_constructible(T);
5050
#else
5151
# error "Not implemented"
5252
#endif

0 commit comments

Comments
 (0)