[llvm] 2c12308 - [Support] Remove trivial_helper, is_copy_assignable, and is_move_assignable (#158007)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 07:54:48 PDT 2025
Author: Kazu Hirata
Date: 2025-09-11T07:54:35-07:00
New Revision: 2c12308f69a1705074beea097ca77fbf9d6ca382
URL: https://github.com/llvm/llvm-project/commit/2c12308f69a1705074beea097ca77fbf9d6ca382
DIFF: https://github.com/llvm/llvm-project/commit/2c12308f69a1705074beea097ca77fbf9d6ca382.diff
LOG: [Support] Remove trivial_helper, is_copy_assignable, and is_move_assignable (#158007)
These seem to be all dead. This patch removes them.
Added:
Modified:
llvm/include/llvm/Support/type_traits.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/type_traits.h b/llvm/include/llvm/Support/type_traits.h
index 80713e17a56b9..a96125c16f11b 100644
--- a/llvm/include/llvm/Support/type_traits.h
+++ b/llvm/include/llvm/Support/type_traits.h
@@ -56,30 +56,6 @@ template <typename T> struct const_pointer_or_const_ref {
typename add_const_past_pointer<T>::type, const T &>;
};
-namespace detail {
-template <class T> union trivial_helper {
- T t;
-};
-
-} // namespace detail
-
-template <typename T> struct is_copy_assignable {
- template <class F>
- static auto get(F *)
- -> decltype(std::declval<F &>() = std::declval<const F &>(),
- std::true_type{});
- static std::false_type get(...);
- static constexpr bool value = decltype(get((T *)nullptr))::value;
-};
-
-template <typename T> struct is_move_assignable {
- template <class F>
- static auto get(F *)
- -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
- static std::false_type get(...);
- static constexpr bool value = decltype(get((T *)nullptr))::value;
-};
-
} // namespace llvm
#endif // LLVM_SUPPORT_TYPE_TRAITS_H
More information about the llvm-commits
mailing list