diff mbox series

[committed] libstdc++: Remove unused helper traits

Message ID 20240801211251.386567-1-jwakely@redhat.com
State New
Headers show
Series [committed] libstdc++: Remove unused helper traits | expand

Commit Message

Jonathan Wakely Aug. 1, 2024, 9:12 p.m. UTC
Tested x86_64-linux. Pushed to trunk.

-- >8 --

These are not used anywhere, we have more efficient variable templates
for them instead. They're not documented as extensions, and are easy for
users to write if they need them.

libstdc++-v3/ChangeLog:

	* include/bits/utility.h (__is_in_place_type): Remove.
	* include/std/variant (__is_in_place_tag): Remove.
---
 libstdc++-v3/include/bits/utility.h | 3 ---
 libstdc++-v3/include/std/variant    | 7 -------
 2 files changed, 10 deletions(-)
diff mbox series

Patch

diff --git a/libstdc++-v3/include/bits/utility.h b/libstdc++-v3/include/bits/utility.h
index 44c74333e92..751ff7b9a27 100644
--- a/libstdc++-v3/include/bits/utility.h
+++ b/libstdc++-v3/include/bits/utility.h
@@ -220,9 +220,6 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
   template<typename _Tp>
     inline constexpr bool __is_in_place_type_v<in_place_type_t<_Tp>> = true;
 
-  template<typename _Tp>
-    using __is_in_place_type = bool_constant<__is_in_place_type_v<_Tp>>;
-
   template<typename>
     inline constexpr bool __is_in_place_index_v = false;
 
diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant
index d0f7bd0242f..12108d07f0b 100644
--- a/libstdc++-v3/include/std/variant
+++ b/libstdc++-v3/include/std/variant
@@ -1488,13 +1488,6 @@  namespace __detail::__variant
 
       using _Traits = __detail::__variant::_Traits<_Types...>;
 
-      template<typename _Tp>
-	struct __is_in_place_tag : false_type { };
-      template<typename _Tp>
-	struct __is_in_place_tag<in_place_type_t<_Tp>> : true_type { };
-      template<size_t _Np>
-	struct __is_in_place_tag<in_place_index_t<_Np>> : true_type { };
-
       template<typename _Tp>
 	static constexpr bool __not_in_place_tag
 	  = !__is_in_place_type_v<__remove_cvref_t<_Tp>>