File tree Expand file tree Collapse file tree 6 files changed +52
-0
lines changed
libcxx/include/__type_traits Expand file tree Collapse file tree 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
2020
2121#if __has_builtin(__add_lvalue_reference)
2222
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
2332template <class _Tp >
2433using __add_lvalue_reference_t _LIBCPP_NODEBUG = __add_lvalue_reference(_Tp);
34+ # endif // defined(_LIBCPP_COMPILER_GCC)
2535
2636#else
2737
Original file line number Diff line number Diff line change @@ -22,8 +22,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2222
2323#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer)
2424
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
2534template <class _Tp >
2635using __add_pointer_t _LIBCPP_NODEBUG = __add_pointer(_Tp);
36+ # endif // defined(_LIBCPP_COMPILER_GCC)
2737
2838#else
2939template <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
2020
2121#if __has_builtin(__add_rvalue_reference)
2222
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
2332template <class _Tp >
2433using __add_rvalue_reference_t _LIBCPP_NODEBUG = __add_rvalue_reference(_Tp);
34+ # endif // defined(_LIBCPP_COMPILER_GCC)
2535
2636#else
2737
Original file line number Diff line number Diff line change 2626_LIBCPP_BEGIN_NAMESPACE_STD
2727
2828#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
2938template <class _Tp >
3039using __decay_t _LIBCPP_NODEBUG = __decay(_Tp);
40+ # endif // defined(_LIBCPP_COMPILER_GCC)
3141
3242template <class _Tp >
3343struct _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 {
2424 using type _LIBCPP_NODEBUG = __remove_all_extents(_Tp);
2525};
2626
27+ # if defined(_LIBCPP_COMPILER_GCC)
28+ template <class _Tp >
29+ using __remove_all_extents_t = typename remove_all_extents<_Tp>::type;
30+ # else
2731template <class _Tp >
2832using __remove_all_extents_t _LIBCPP_NODEBUG = __remove_all_extents(_Tp);
33+ # endif // defined(_LIBCPP_COMPILER_GCC)
34+
2935#else
3036template <class _Tp >
3137struct remove_all_extents {
Original file line number Diff line number Diff line change @@ -24,8 +24,14 @@ struct _LIBCPP_NO_SPECIALIZATIONS remove_extent {
2424 using type _LIBCPP_NODEBUG = __remove_extent(_Tp);
2525};
2626
27+ # if defined(_LIBCPP_COMPILER_GCC)
28+ template <class _Tp >
29+ using __remove_extent_t = typename remove_extent<_Tp>::type;
30+ # else
2731template <class _Tp >
2832using __remove_extent_t _LIBCPP_NODEBUG = __remove_extent(_Tp);
33+ # endif // defined(_LIBCPP_COMPILER_GCC)
34+
2935#else
3036template <class _Tp >
3137struct remove_extent {
You can’t perform that action at this time.
0 commit comments