Skip to content

[libc++] Remove dead implementation of is_nothrow_convertible and merge the remaining code into is_convertible.h #137717

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
Apr 29, 2025
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion libcxx/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,6 @@ set(files
__type_traits/is_member_pointer.h
__type_traits/is_nothrow_assignable.h
__type_traits/is_nothrow_constructible.h
__type_traits/is_nothrow_convertible.h
__type_traits/is_nothrow_destructible.h
__type_traits/is_null_pointer.h
__type_traits/is_object.h
Expand Down
10 changes: 10 additions & 0 deletions libcxx/include/__type_traits/is_convertible.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ template <class _From, class _To>
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
#endif

#if _LIBCPP_STD_VER >= 20

template <class _Tp, class _Up>
struct _LIBCPP_NO_SPECIALIZATIONS is_nothrow_convertible : bool_constant<__is_nothrow_convertible(_Tp, _Up)> {};

template <class _Tp, class _Up>
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_convertible_v = __is_nothrow_convertible(_Tp, _Up);

#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___TYPE_TRAITS_IS_CONVERTIBLE_H
62 changes: 0 additions & 62 deletions libcxx/include/__type_traits/is_nothrow_convertible.h

This file was deleted.

4 changes: 0 additions & 4 deletions libcxx/include/module.modulemap.in
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,6 @@ module std_core [system] {
header "__type_traits/is_nothrow_constructible.h"
export std_core.type_traits.integral_constant
}
module is_nothrow_convertible {
header "__type_traits/is_nothrow_convertible.h"
export std_core.type_traits.integral_constant
}
module is_nothrow_destructible {
header "__type_traits/is_nothrow_destructible.h"
export std_core.type_traits.integral_constant
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,6 @@ namespace std
# include <__type_traits/common_reference.h>
# include <__type_traits/is_bounded_array.h>
# include <__type_traits/is_constant_evaluated.h>
# include <__type_traits/is_nothrow_convertible.h>
# include <__type_traits/is_unbounded_array.h>
# include <__type_traits/type_identity.h>
# include <__type_traits/unwrap_ref.h>
Expand Down
Loading