File tree Expand file tree Collapse file tree 10 files changed +26
-82
lines changed Expand file tree Collapse file tree 10 files changed +26
-82
lines changed Original file line number Diff line number Diff line change @@ -738,12 +738,10 @@ set(files
738
738
__tuple/tuple_like_no_subrange.h
739
739
__tuple/tuple_size.h
740
740
__tuple/tuple_types.h
741
- __type_traits/add_const.h
742
- __type_traits/add_cv.h
741
+ __type_traits/add_cv_quals.h
743
742
__type_traits/add_lvalue_reference.h
744
743
__type_traits/add_pointer.h
745
744
__type_traits/add_rvalue_reference.h
746
- __type_traits/add_volatile.h
747
745
__type_traits/aligned_storage.h
748
746
__type_traits/aligned_union.h
749
747
__type_traits/alignment_of.h
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 17
17
18
18
_LIBCPP_BEGIN_NAMESPACE_STD
19
19
20
+ template <class _Tp >
21
+ struct _LIBCPP_TEMPLATE_VIS add_const {
22
+ typedef _LIBCPP_NODEBUG const _Tp type;
23
+ };
24
+
25
+ #if _LIBCPP_STD_VER >= 14
26
+ template <class _Tp >
27
+ using add_const_t = typename add_const<_Tp>::type;
28
+ #endif
29
+
20
30
template <class _Tp >
21
31
struct _LIBCPP_TEMPLATE_VIS add_cv {
22
32
typedef _LIBCPP_NODEBUG const volatile _Tp type;
@@ -27,6 +37,16 @@ template <class _Tp>
27
37
using add_cv_t = typename add_cv<_Tp>::type;
28
38
#endif
29
39
40
+ template <class _Tp >
41
+ struct _LIBCPP_TEMPLATE_VIS add_volatile {
42
+ typedef _LIBCPP_NODEBUG volatile _Tp type;
43
+ };
44
+
45
+ #if _LIBCPP_STD_VER >= 14
46
+ template <class _Tp >
47
+ using add_volatile_t = typename add_volatile<_Tp>::type;
48
+ #endif
49
+
30
50
_LIBCPP_END_NAMESPACE_STD
31
51
32
52
#endif // _LIBCPP___TYPE_TRAITS_ADD_CV_H
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 10
10
#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H
11
11
12
12
#include < __config>
13
- #include < __type_traits/add_const.h>
14
13
#include < __type_traits/add_lvalue_reference.h>
15
14
#include < __type_traits/add_rvalue_reference.h>
16
15
#include < __type_traits/integral_constant.h>
Original file line number Diff line number Diff line change 10
10
#define _LIBCPP___UTILITY_AS_CONST_H
11
11
12
12
#include < __config>
13
- #include < __type_traits/add_const.h>
14
- #include < __utility/forward.h>
15
- #include < __utility/move.h>
16
13
17
14
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
18
15
# pragma GCC system_header
@@ -22,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
22
19
23
20
#if _LIBCPP_STD_VER >= 17
24
21
template <class _Tp >
25
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr add_const_t < _Tp> & as_const (_Tp& __t ) noexcept {
22
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Tp& as_const (_Tp& __t ) noexcept {
26
23
return __t ;
27
24
}
28
25
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ namespace std {
85
85
#include < __memory/allocator_destructor.h>
86
86
#include < __memory/allocator_traits.h>
87
87
#include < __memory/unique_ptr.h>
88
- #include < __type_traits/add_const .h>
88
+ #include < __type_traits/add_cv_quals .h>
89
89
#include < __type_traits/add_pointer.h>
90
90
#include < __type_traits/aligned_storage.h>
91
91
#include < __type_traits/conditional.h>
Original file line number Diff line number Diff line change @@ -63,12 +63,10 @@ module std_core [system] {
63
63
}
64
64
65
65
module type_traits {
66
- module add_const { header "__type_traits/add_const.h" }
67
- module add_cv { header "__type_traits/add_cv.h" }
66
+ module add_cv_quals { header "__type_traits/add_cv_quals.h" }
68
67
module add_lvalue_reference { header "__type_traits/add_lvalue_reference.h" }
69
68
module add_pointer { header "__type_traits/add_pointer.h" }
70
69
module add_rvalue_reference { header "__type_traits/add_rvalue_reference.h" }
71
- module add_volatile { header "__type_traits/add_volatile.h" }
72
70
module aligned_storage { header "__type_traits/aligned_storage.h" }
73
71
module aligned_union { header "__type_traits/aligned_union.h" }
74
72
module alignment_of { header "__type_traits/alignment_of.h" }
Original file line number Diff line number Diff line change @@ -425,12 +425,10 @@ namespace std
425
425
*/
426
426
427
427
#include < __config>
428
- #include < __type_traits/add_const.h>
429
- #include < __type_traits/add_cv.h>
428
+ #include < __type_traits/add_cv_quals.h>
430
429
#include < __type_traits/add_lvalue_reference.h>
431
430
#include < __type_traits/add_pointer.h>
432
431
#include < __type_traits/add_rvalue_reference.h>
433
- #include < __type_traits/add_volatile.h>
434
432
#include < __type_traits/aligned_storage.h>
435
433
#include < __type_traits/aligned_union.h>
436
434
#include < __type_traits/alignment_of.h>
Original file line number Diff line number Diff line change @@ -226,10 +226,8 @@ namespace std {
226
226
#include < __memory/construct_at.h>
227
227
#include < __tuple/find_index.h>
228
228
#include < __tuple/sfinae_helpers.h>
229
- #include < __type_traits/add_const.h>
230
- #include < __type_traits/add_cv.h>
229
+ #include < __type_traits/add_cv_quals.h>
231
230
#include < __type_traits/add_pointer.h>
232
- #include < __type_traits/add_volatile.h>
233
231
#include < __type_traits/common_type.h>
234
232
#include < __type_traits/conditional.h>
235
233
#include < __type_traits/conjunction.h>
You can’t perform that action at this time.
0 commit comments