Skip to content

Commit b8a57c4

Browse files
committed
Just disable broken __has_builtin(...) branches for GCC 15.
1 parent 7af1511 commit b8a57c4

File tree

6 files changed

+6
-58
lines changed

6 files changed

+6
-58
lines changed

libcxx/include/__type_traits/add_lvalue_reference.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,10 @@
1818

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if __has_builtin(__add_lvalue_reference)
21+
#if __has_builtin(__add_lvalue_reference) && __GNUC__ < 15
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
3223
template <class _Tp>
3324
using __add_lvalue_reference_t _LIBCPP_NODEBUG = __add_lvalue_reference(_Tp);
34-
# endif // defined(_LIBCPP_COMPILER_GCC)
3525

3626
#else
3727

libcxx/include/__type_traits/add_pointer.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,10 @@
2020

2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

23-
#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer)
23+
#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer) && __GNUC__ < 15
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
3425
template <class _Tp>
3526
using __add_pointer_t _LIBCPP_NODEBUG = __add_pointer(_Tp);
36-
# endif // defined(_LIBCPP_COMPILER_GCC)
3727

3828
#else
3929
template <class _Tp, bool = __is_referenceable_v<_Tp> || is_void<_Tp>::value>

libcxx/include/__type_traits/add_rvalue_reference.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,10 @@
1818

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if __has_builtin(__add_rvalue_reference)
21+
#if __has_builtin(__add_rvalue_reference) && __GNUC__ < 15
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
3223
template <class _Tp>
3324
using __add_rvalue_reference_t _LIBCPP_NODEBUG = __add_rvalue_reference(_Tp);
34-
# endif // defined(_LIBCPP_COMPILER_GCC)
3525

3626
#else
3727

libcxx/include/__type_traits/decay.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,9 @@
2525

2626
_LIBCPP_BEGIN_NAMESPACE_STD
2727

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
28+
#if __has_builtin(__decay) && __GNUC__ < 15
3829
template <class _Tp>
3930
using __decay_t _LIBCPP_NODEBUG = __decay(_Tp);
40-
# endif // defined(_LIBCPP_COMPILER_GCC)
4131

4232
template <class _Tp>
4333
struct _LIBCPP_NO_SPECIALIZATIONS decay {

libcxx/include/__type_traits/remove_all_extents.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,14 @@
1818

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if __has_builtin(__remove_all_extents)
21+
#if __has_builtin(__remove_all_extents) && __GNUC__ < 15
2222
template <class _Tp>
2323
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
3127
template <class _Tp>
3228
using __remove_all_extents_t _LIBCPP_NODEBUG = __remove_all_extents(_Tp);
33-
# endif // defined(_LIBCPP_COMPILER_GCC)
34-
3529
#else
3630
template <class _Tp>
3731
struct remove_all_extents {

libcxx/include/__type_traits/remove_extent.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,14 @@
1818

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if __has_builtin(__remove_extent)
21+
#if __has_builtin(__remove_extent) && __GNUC__ < 15
2222
template <class _Tp>
2323
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
3127
template <class _Tp>
3228
using __remove_extent_t _LIBCPP_NODEBUG = __remove_extent(_Tp);
33-
# endif // defined(_LIBCPP_COMPILER_GCC)
34-
3529
#else
3630
template <class _Tp>
3731
struct remove_extent {

0 commit comments

Comments
 (0)