File tree 6 files changed +52
-0
lines changed
libcxx/include/__type_traits 6 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD
20
20
21
21
#if __has_builtin(__add_lvalue_reference)
22
22
23
+ # if defined(_LIBCPP_COMPILER_GCC)
24
+ template <class _Tp >
25
+ struct __add_lvalue_reference_gcc {
26
+ using type = __add_lvalue_reference(_Tp);
27
+ };
28
+
29
+ template <class _Tp >
30
+ using __add_lvalue_reference_t _LIBCPP_NODEBUG = typename __add_lvalue_reference_gcc<_Tp>::type;
31
+ # else
23
32
template <class _Tp >
24
33
using __add_lvalue_reference_t _LIBCPP_NODEBUG = __add_lvalue_reference(_Tp);
34
+ # endif // defined(_LIBCPP_COMPILER_GCC)
25
35
26
36
#else
27
37
Original file line number Diff line number Diff line change @@ -22,8 +22,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD
22
22
23
23
#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer)
24
24
25
+ # if defined(_LIBCPP_COMPILER_GCC)
26
+ template <class _Tp >
27
+ struct __add_pointer_gcc {
28
+ using type = __add_pointer(_Tp);
29
+ };
30
+
31
+ template <class _Tp >
32
+ using __add_pointer_t _LIBCPP_NODEBUG = typename __add_pointer_gcc<_Tp>::type;
33
+ # else
25
34
template <class _Tp >
26
35
using __add_pointer_t _LIBCPP_NODEBUG = __add_pointer(_Tp);
36
+ # endif // defined(_LIBCPP_COMPILER_GCC)
27
37
28
38
#else
29
39
template <class _Tp , bool = __is_referenceable_v<_Tp> || is_void<_Tp>::value>
Original file line number Diff line number Diff line change @@ -20,8 +20,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD
20
20
21
21
#if __has_builtin(__add_rvalue_reference)
22
22
23
+ # if defined(_LIBCPP_COMPILER_GCC)
24
+ template <class _Tp >
25
+ struct __add_rvalue_reference_gcc {
26
+ using type = __add_rvalue_reference(_Tp);
27
+ };
28
+
29
+ template <class _Tp >
30
+ using __add_rvalue_reference_t _LIBCPP_NODEBUG = typename __add_rvalue_reference_gcc<_Tp>::type;
31
+ # else
23
32
template <class _Tp >
24
33
using __add_rvalue_reference_t _LIBCPP_NODEBUG = __add_rvalue_reference(_Tp);
34
+ # endif // defined(_LIBCPP_COMPILER_GCC)
25
35
26
36
#else
27
37
Original file line number Diff line number Diff line change 26
26
_LIBCPP_BEGIN_NAMESPACE_STD
27
27
28
28
#if __has_builtin(__decay)
29
+ # if defined(_LIBCPP_COMPILER_GCC)
30
+ template <class _Tp >
31
+ struct __decay_gcc {
32
+ using type = __decay(_Tp);
33
+ };
34
+
35
+ template <class _Tp >
36
+ using __decay_t _LIBCPP_NODEBUG = typename __decay_gcc<_Tp>::type;
37
+ # else
29
38
template <class _Tp >
30
39
using __decay_t _LIBCPP_NODEBUG = __decay(_Tp);
40
+ # endif // defined(_LIBCPP_COMPILER_GCC)
31
41
32
42
template <class _Tp >
33
43
struct _LIBCPP_NO_SPECIALIZATIONS decay {
Original file line number Diff line number Diff line change @@ -24,8 +24,14 @@ struct _LIBCPP_NO_SPECIALIZATIONS remove_all_extents {
24
24
using type _LIBCPP_NODEBUG = __remove_all_extents(_Tp);
25
25
};
26
26
27
+ # if defined(_LIBCPP_COMPILER_GCC)
28
+ template <class _Tp >
29
+ using __remove_all_extents_t = typename remove_all_extents<_Tp>::type;
30
+ # else
27
31
template <class _Tp >
28
32
using __remove_all_extents_t _LIBCPP_NODEBUG = __remove_all_extents(_Tp);
33
+ # endif // defined(_LIBCPP_COMPILER_GCC)
34
+
29
35
#else
30
36
template <class _Tp >
31
37
struct remove_all_extents {
Original file line number Diff line number Diff line change @@ -24,8 +24,14 @@ struct _LIBCPP_NO_SPECIALIZATIONS remove_extent {
24
24
using type _LIBCPP_NODEBUG = __remove_extent(_Tp);
25
25
};
26
26
27
+ # if defined(_LIBCPP_COMPILER_GCC)
28
+ template <class _Tp >
29
+ using __remove_extent_t = typename remove_extent<_Tp>::type;
30
+ # else
27
31
template <class _Tp >
28
32
using __remove_extent_t _LIBCPP_NODEBUG = __remove_extent(_Tp);
33
+ # endif // defined(_LIBCPP_COMPILER_GCC)
34
+
29
35
#else
30
36
template <class _Tp >
31
37
struct remove_extent {
You can’t perform that action at this time.
0 commit comments