From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sun, 8 May 2022 16:42:09 -0400 Subject: [PATCH 18/31] 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 -struct is_trivially_copy_constructible - : std::is_copy_constructible< - ::llvm::detail::copy_construction_triviality_helper> {}; -template -struct is_trivially_copy_constructible : std::true_type {}; -template -struct is_trivially_copy_constructible : std::false_type {}; +using is_trivially_move_constructible = std::is_trivially_move_constructible; -/// An implementation of `std::is_trivially_move_constructible` since we have -/// users with STLs that don't yet include it. -template -struct is_trivially_move_constructible - : std::is_move_constructible< - ::llvm::detail::move_construction_triviality_helper> {}; template -struct is_trivially_move_constructible : std::true_type {}; -template -struct is_trivially_move_constructible : std::true_type {}; - - -template -struct is_copy_assignable { - template - static auto get(F*) -> decltype(std::declval() = std::declval(), std::true_type{}); - static std::false_type get(...); - static constexpr bool value = decltype(get((T*)nullptr))::value; -}; - -template -struct is_move_assignable { - template - static auto get(F*) -> decltype(std::declval() = std::declval(), 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; } // end namespace llvm