[libcxx-commits] [libcxx] 6e48a6e - [libcxx] Fix deprecation warning by suppressing deprecated around
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat May 23 14:34:34 PDT 2020
Author: zoecarver
Date: 2020-05-23T14:33:10-07:00
New Revision: 6e48a6e407bf23ca5baf8bbfead8f869786bec34
URL: https://github.com/llvm/llvm-project/commit/6e48a6e407bf23ca5baf8bbfead8f869786bec34
DIFF: https://github.com/llvm/llvm-project/commit/6e48a6e407bf23ca5baf8bbfead8f869786bec34.diff
LOG: [libcxx] Fix deprecation warning by suppressing deprecated around
__test_has_construct.
In C++17 some tests started failing after a521532aa16df2c06c91488f2a4e787586f0a611. This fixes those errors by suppressing the deprecation warning when calling `construct` in `__test_has_construct`. This is the same solution as `__has_destroy_test` already uses.
Reviewers: ldionne, #libc!
Subscribers: dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D80481
Added:
Modified:
libcxx/include/memory
Removed:
################################################################################
diff --git a/libcxx/include/memory b/libcxx/include/memory
index 54aeab6ce82d..b1abfacca0ba 100644
--- a/libcxx/include/memory
+++ b/libcxx/include/memory
@@ -1352,9 +1352,12 @@ struct __has_allocate_hint
#endif // _LIBCPP_CXX03_LANG
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Alloc, class ..._Args,
class = decltype(_VSTD::declval<_Alloc>().construct(_VSTD::declval<_Args>()...))>
static true_type __test_has_construct(int);
+_LIBCPP_SUPPRESS_DEPRECATED_POP
+
template <class _Alloc, class...>
static false_type __test_has_construct(...);
More information about the libcxx-commits
mailing list