File tree 5 files changed +15
-11
lines changed
test/libcxx/transitive_includes
5 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 10
10
#define _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H
11
11
12
12
#include < __config>
13
- #include < cstddef>
14
13
15
14
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16
15
# pragma GCC system_header
@@ -26,15 +25,16 @@ struct remove_reference {
26
25
27
26
template <class _Tp >
28
27
using __libcpp_remove_reference_t = __remove_reference_t (_Tp);
29
- #else
30
- // clang-format off
31
- template <class _Tp > struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG _Tp type;};
32
- template <class _Tp > struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG _Tp type;};
33
- template <class _Tp > struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;};
34
- // clang-format on
28
+ #elif __has_builtin(__remove_reference)
29
+ template <class _Tp >
30
+ struct remove_reference {
31
+ using type _LIBCPP_NODEBUG = __remove_reference(_Tp);
32
+ };
35
33
36
34
template <class _Tp >
37
35
using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type;
36
+ #else
37
+ # error "remove_reference not implemented!"
38
38
#endif // __has_builtin(__remove_reference_t)
39
39
40
40
#if _LIBCPP_STD_VER >= 14
Original file line number Diff line number Diff line change @@ -254,4 +254,8 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_wmemchr(_Tp
254
254
255
255
_LIBCPP_END_NAMESPACE_STD
256
256
257
+ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
258
+ # include < cstddef>
259
+ #endif
260
+
257
261
#endif // _LIBCPP_CWCHAR
Original file line number Diff line number Diff line change @@ -142,4 +142,8 @@ _LIBCPP_END_NAMESPACE_STD
142
142
143
143
#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
144
144
145
+ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
146
+ # include < cstddef>
147
+ #endif
148
+
145
149
#endif // _LIBCPP_EXECUTION
Original file line number Diff line number Diff line change @@ -142,7 +142,6 @@ coroutine version
142
142
cstddef version
143
143
ctgmath ccomplex
144
144
ctgmath cmath
145
- cwchar cstddef
146
145
cwchar cwctype
147
146
cwctype cctype
148
147
deque compare
@@ -161,7 +160,6 @@ exception cstdlib
161
160
exception new
162
161
exception typeinfo
163
162
exception version
164
- execution cstddef
165
163
execution version
166
164
expected cstddef
167
165
expected initializer_list
Original file line number Diff line number Diff line change @@ -142,7 +142,6 @@ coroutine version
142
142
cstddef version
143
143
ctgmath ccomplex
144
144
ctgmath cmath
145
- cwchar cstddef
146
145
cwchar cwctype
147
146
cwctype cctype
148
147
deque compare
@@ -161,7 +160,6 @@ exception cstdlib
161
160
exception new
162
161
exception typeinfo
163
162
exception version
164
- execution cstddef
165
163
execution version
166
164
expected cstddef
167
165
expected initializer_list
You can’t perform that action at this time.
0 commit comments