[llvm] [Support] Remove trivial_helper, is_copy_assignable, and is_move_assignable (PR #158007)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 00:15:20 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-support
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
These seem to be all dead. This patch removes them.
---
Full diff: https://github.com/llvm/llvm-project/pull/158007.diff
1 Files Affected:
- (modified) llvm/include/llvm/Support/type_traits.h (-24)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/158007
More information about the llvm-commits
mailing list