mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
61 lines
2.4 KiB
Diff
61 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: PJ Reiniger <pj.reiniger@gmail.com>
|
|
Date: Sun, 8 May 2022 16:42:09 -0400
|
|
Subject: [PATCH 18/30] Use std::is_trivially_copy_constructible
|
|
|
|
---
|
|
llvm/include/llvm/Support/type_traits.h | 37 ++-----------------------
|
|
1 file changed, 2 insertions(+), 35 deletions(-)
|
|
|
|
diff --git a/llvm/include/llvm/Support/type_traits.h b/llvm/include/llvm/Support/type_traits.h
|
|
index a6046de87d1e3e1264a0040826ea347b870a8f9e..292a2cb78b93717647cf88d00f88c2eec14f52f6 100644
|
|
--- a/llvm/include/llvm/Support/type_traits.h
|
|
+++ b/llvm/include/llvm/Support/type_traits.h
|
|
@@ -92,44 +92,11 @@ union trivial_helper {
|
|
|
|
} // end namespace detail
|
|
|
|
-/// An implementation of `std::is_trivially_copy_constructible` since we have
|
|
-/// users with STLs that don't yet include it.
|
|
template <typename T>
|
|
-struct is_trivially_copy_constructible
|
|
- : std::is_copy_constructible<
|
|
- ::llvm::detail::copy_construction_triviality_helper<T>> {};
|
|
-template <typename T>
|
|
-struct is_trivially_copy_constructible<T &> : std::true_type {};
|
|
-template <typename T>
|
|
-struct is_trivially_copy_constructible<T &&> : std::false_type {};
|
|
+using is_trivially_move_constructible = std::is_trivially_move_constructible<T>;
|
|
|
|
-/// An implementation of `std::is_trivially_move_constructible` since we have
|
|
-/// users with STLs that don't yet include it.
|
|
-template <typename T>
|
|
-struct is_trivially_move_constructible
|
|
- : std::is_move_constructible<
|
|
- ::llvm::detail::move_construction_triviality_helper<T>> {};
|
|
template <typename T>
|
|
-struct is_trivially_move_constructible<T &> : std::true_type {};
|
|
-template <typename T>
|
|
-struct is_trivially_move_constructible<T &&> : std::true_type {};
|
|
-
|
|
-
|
|
-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;
|
|
-};
|
|
+using is_trivially_copy_constructible = std::is_trivially_copy_constructible<T>;
|
|
|
|
} // end namespace llvm
|
|
|