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
5555Deprecations and Removals
5656-------------------------
5757
58+ - ``std::is_pod `` and ``std::is_pod_v `` are deprecated since C++20 according to the standard.
59+
5860Upcoming Deprecations and Removals
5961----------------------------------
6062
Original file line number Diff line number Diff line change 1919_LIBCPP_BEGIN_NAMESPACE_STD
2020
2121template <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)> {};
2324
2425#if _LIBCPP_STD_VER >= 17
2526template <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);
2728#endif
2829
2930_LIBCPP_END_NAMESPACE_STD
Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ namespace std
9595 template <class T> struct is_unbounded_array; // C++20
9696
9797 // Member introspection:
98- template <class T> struct is_pod;
9998 template <class T> struct is_trivial;
99+ template <class T> struct is_pod; // Deprecated in C++20
100100 template <class T> struct is_trivially_copyable;
101101 template <class T> struct is_standard_layout;
102102 template <class T> struct is_literal_type; // Deprecated in C++17; removed in C++20
@@ -303,7 +303,7 @@ namespace std
303303 template <class T> inline constexpr bool is_standard_layout_v
304304 = is_standard_layout<T>::value; // C++17
305305 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
307307 template <class T> inline constexpr bool is_literal_type_v
308308 = is_literal_type<T>::value; // C++17; deprecated in C++17; removed in C++20
309309 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 1010
1111// is_pod
1212
13+ // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
14+
1315#include < type_traits>
1416#include " test_macros.h"
1517
You can’t perform that action at this time.
0 commit comments