[libc++][NFC] Use more appropriate type traits for a few cases (#114025)

GitOrigin-RevId: de87dda2da7febb66bdbaff8328632b1db6c88b1
diff --git a/include/__hash_table b/include/__hash_table
index 8e4cb3c..a0c72f4 100644
--- a/include/__hash_table
+++ b/include/__hash_table
@@ -36,6 +36,7 @@
 #include <__type_traits/is_nothrow_constructible.h>
 #include <__type_traits/is_pointer.h>
 #include <__type_traits/is_reference.h>
+#include <__type_traits/is_same.h>
 #include <__type_traits/is_swappable.h>
 #include <__type_traits/remove_const.h>
 #include <__type_traits/remove_cvref.h>
diff --git a/include/__memory/shared_ptr.h b/include/__memory/shared_ptr.h
index 0722b3f..31650a5 100644
--- a/include/__memory/shared_ptr.h
+++ b/include/__memory/shared_ptr.h
@@ -42,9 +42,11 @@
 #include <__type_traits/is_constructible.h>
 #include <__type_traits/is_convertible.h>
 #include <__type_traits/is_reference.h>
+#include <__type_traits/is_same.h>
 #include <__type_traits/is_unbounded_array.h>
 #include <__type_traits/nat.h>
 #include <__type_traits/negation.h>
+#include <__type_traits/remove_cv.h>
 #include <__type_traits/remove_extent.h>
 #include <__type_traits/remove_reference.h>
 #include <__utility/declval.h>
diff --git a/include/__memory/uninitialized_algorithms.h b/include/__memory/uninitialized_algorithms.h
index 38517a2..627ee44 100644
--- a/include/__memory/uninitialized_algorithms.h
+++ b/include/__memory/uninitialized_algorithms.h
@@ -25,6 +25,7 @@
 #include <__type_traits/extent.h>
 #include <__type_traits/is_array.h>
 #include <__type_traits/is_constant_evaluated.h>
+#include <__type_traits/is_same.h>
 #include <__type_traits/is_trivially_assignable.h>
 #include <__type_traits/is_trivially_constructible.h>
 #include <__type_traits/is_trivially_relocatable.h>
diff --git a/include/__tuple/make_tuple_types.h b/include/__tuple/make_tuple_types.h
index 53e98c3..024e9c5 100644
--- a/include/__tuple/make_tuple_types.h
+++ b/include/__tuple/make_tuple_types.h
@@ -18,7 +18,7 @@
 #include <__tuple/tuple_size.h>
 #include <__tuple/tuple_types.h>
 #include <__type_traits/copy_cvref.h>
-#include <__type_traits/remove_cv.h>
+#include <__type_traits/remove_cvref.h>
 #include <__type_traits/remove_reference.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -58,7 +58,7 @@
           bool _SameSize = (_Ep == tuple_size<__libcpp_remove_reference_t<_Tp> >::value)>
 struct __make_tuple_types {
   static_assert(_Sp <= _Ep, "__make_tuple_types input error");
-  using _RawTp = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >;
+  using _RawTp = __remove_cvref_t<_Tp>;
   using _Maker = __make_tuple_types_flat<_RawTp, typename __make_tuple_indices<_Ep, _Sp>::type>;
   using type   = typename _Maker::template __apply_quals<_Tp>;
 };
diff --git a/include/new b/include/new
index 290ad9e..5318ce5 100644
--- a/include/new
+++ b/include/new
@@ -90,8 +90,7 @@
 #include <__cstddef/size_t.h>
 #include <__exception/exception.h>
 #include <__type_traits/is_function.h>
-#include <__type_traits/is_same.h>
-#include <__type_traits/remove_cv.h>
+#include <__type_traits/is_void.h>
 #include <__verbose_abort>
 #include <version>
 
@@ -342,7 +341,7 @@
 template <class _Tp>
 [[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT {
   static_assert(!(is_function<_Tp>::value), "can't launder functions");
-  static_assert(!(is_same<void, __remove_cv_t<_Tp> >::value), "can't launder cv-void");
+  static_assert(!is_void<_Tp>::value, "can't launder cv-void");
   return __builtin_launder(__p);
 }
 
diff --git a/include/optional b/include/optional
index b9dcf90..7ad6a9e 100644
--- a/include/optional
+++ b/include/optional
@@ -207,6 +207,7 @@
 #include <__type_traits/is_nothrow_constructible.h>
 #include <__type_traits/is_object.h>
 #include <__type_traits/is_reference.h>
+#include <__type_traits/is_same.h>
 #include <__type_traits/is_scalar.h>
 #include <__type_traits/is_swappable.h>
 #include <__type_traits/is_trivially_assignable.h>
@@ -215,6 +216,7 @@
 #include <__type_traits/is_trivially_relocatable.h>
 #include <__type_traits/negation.h>
 #include <__type_traits/remove_const.h>
+#include <__type_traits/remove_cv.h>
 #include <__type_traits/remove_cvref.h>
 #include <__type_traits/remove_reference.h>
 #include <__utility/declval.h>
diff --git a/include/variant b/include/variant
index ee80fb0..6e75255 100644
--- a/include/variant
+++ b/include/variant
@@ -245,6 +245,7 @@
 #include <__type_traits/is_nothrow_assignable.h>
 #include <__type_traits/is_nothrow_constructible.h>
 #include <__type_traits/is_reference.h>
+#include <__type_traits/is_same.h>
 #include <__type_traits/is_swappable.h>
 #include <__type_traits/is_trivially_assignable.h>
 #include <__type_traits/is_trivially_constructible.h>
diff --git a/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp b/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp
index 40aba0a..404cdbc 100644
--- a/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp
+++ b/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp
@@ -12,10 +12,9 @@
 
 // UNSUPPORTED: c++03, c++11, c++14
 
-#include <new>
 #include <cassert>
-
-#include "test_macros.h"
+#include <new>
+#include <type_traits>
 
 constexpr int gi = 5;
 constexpr float gf = 8.f;