File tree Expand file tree Collapse file tree 5 files changed +27
-4
lines changed
test/std/utilities/meta/meta.unary/meta.unary.prop Expand file tree Collapse file tree 5 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ Improvements and New Features
55
55
Deprecations and Removals
56
56
-------------------------
57
57
58
+ - ``std::is_pod `` and ``std::is_pod_v `` are deprecated since C++20 according to the standard.
59
+
58
60
Upcoming Deprecations and Removals
59
61
----------------------------------
60
62
Original file line number Diff line number Diff line change 19
19
_LIBCPP_BEGIN_NAMESPACE_STD
20
20
21
21
template <class _Tp >
22
- struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_pod : public integral_constant<bool , __is_pod(_Tp)> {};
22
+ struct _LIBCPP_TEMPLATE_VIS
23
+ _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_NO_SPECIALIZATIONS is_pod : public integral_constant<bool , __is_pod(_Tp)> {};
23
24
24
25
#if _LIBCPP_STD_VER >= 17
25
26
template <class _Tp >
26
- _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_pod_v = __is_pod(_Tp);
27
+ _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_pod_v = __is_pod(_Tp);
27
28
#endif
28
29
29
30
_LIBCPP_END_NAMESPACE_STD
Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ namespace std
95
95
template <class T> struct is_unbounded_array; // C++20
96
96
97
97
// Member introspection:
98
- template <class T> struct is_pod;
99
98
template <class T> struct is_trivial;
99
+ template <class T> struct is_pod; // Deprecated in C++20
100
100
template <class T> struct is_trivially_copyable;
101
101
template <class T> struct is_standard_layout;
102
102
template <class T> struct is_literal_type; // Deprecated in C++17; removed in C++20
@@ -303,7 +303,7 @@ namespace std
303
303
template <class T> inline constexpr bool is_standard_layout_v
304
304
= is_standard_layout<T>::value; // C++17
305
305
template <class T> inline constexpr bool is_pod_v
306
- = is_pod<T>::value; // C++17
306
+ = is_pod<T>::value; // C++17; deprecated in C++20
307
307
template <class T> inline constexpr bool is_literal_type_v
308
308
= is_literal_type<T>::value; // C++17; deprecated in C++17; removed in C++20
309
309
template <class T> inline constexpr bool is_empty_v
Original file line number Diff line number Diff line change
1
+ // ===----------------------------------------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
+
9
+ // REQUIRES: std-at-least-c++20
10
+
11
+ // <type_traits>
12
+
13
+ // is_pod and is_pod_v are deprecated in C++20 by P0767R1
14
+
15
+ #include < type_traits>
16
+
17
+ static_assert (std::is_pod<int >::value); // expected-warning {{'is_pod<int>' is deprecated}}
18
+ static_assert (std::is_pod_v<int >); // expected-warning {{'is_pod_v<int>' is deprecated}}
Original file line number Diff line number Diff line change 10
10
11
11
// is_pod
12
12
13
+ // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
14
+
13
15
#include < type_traits>
14
16
#include " test_macros.h"
15
17
You can’t perform that action at this time.
0 commit comments