]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove unused helper traits
authorJonathan Wakely <jwakely@redhat.com>
Sat, 23 Mar 2024 11:11:17 +0000 (11:11 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 1 Aug 2024 20:56:57 +0000 (21:56 +0100)
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
libstdc++-v3/include/std/variant

index 44c74333e92433b4297e53ae384f684702a87a77..751ff7b9a2779d23313c21adb2ddbb1eed28cdff 100644 (file)
@@ -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;
 
index d0f7bd0242f898bbcea8fd9e998821d6a50907a2..12108d07f0b1fc90d6f0345cdc8a2069993a4895 100644 (file)
@@ -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>>