Skip to content

Commit

Permalink
[libc++] Use __is_array if the builtin is fixed (llvm#93037)
Browse files Browse the repository at this point in the history
  • Loading branch information
philnik777 committed Jul 5, 2024
1 parent 00c622e commit db7db68
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libcxx/include/__type_traits/is_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@

_LIBCPP_BEGIN_NAMESPACE_STD

// TODO: Clang incorrectly reports that __is_array is true for T[0].
// Re-enable the branch once https://llvm.org/PR54705 is fixed.
#if __has_builtin(__is_array) && 0
#if __has_builtin(__is_array) && \
(!defined(_LIBCPP_COMPILER_CLANG_BASED) || (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1900))

template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_array : _BoolConstant<__is_array(_Tp)> {};
Expand Down

0 comments on commit db7db68

Please sign in to comment.