Skip to content

[libc++] Simplify the implementation of is_unbounded_array a bit #137716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions libcxx/include/__type_traits/is_unbounded_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,11 @@ inline const bool __is_unbounded_array_v<_Tp[]> = true;

#if _LIBCPP_STD_VER >= 20

template <class>
struct _LIBCPP_NO_SPECIALIZATIONS is_unbounded_array : false_type {};

_LIBCPP_DIAGNOSTIC_PUSH
# if __has_warning("-Winvalid-specialization")
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-specialization")
# endif
template <class _Tp>
struct is_unbounded_array<_Tp[]> : true_type {};
_LIBCPP_DIAGNOSTIC_POP
struct _LIBCPP_NO_SPECIALIZATIONS is_unbounded_array : bool_constant<__is_unbounded_array_v<_Tp>> {};

template <class _Tp>
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_unbounded_array_v = is_unbounded_array<_Tp>::value;
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_unbounded_array_v = __is_unbounded_array_v<_Tp>;

#endif

Expand Down
Loading