[gcc r10-9942] libstdc++: Remove unused helpers for std::variant

Jonathan Wakely redi@gcc.gnu.org
Fri Jun 18 13:11:18 GMT 2021


https://gcc.gnu.org/g:49b41ca3d010c7e394e3d71bf2f71c556cee70f3

commit r10-9942-g49b41ca3d010c7e394e3d71bf2f71c556cee70f3
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Jun 18 14:07:57 2021 +0100

    libstdc++: Remove unused helpers for std::variant
    
    The r10-9937-g8ad4d9b46944db1be6f1b216b5b8e74bd9f66937 backport brought
    these helpers from the gcc-11 branch, but they aren't needed for the
    std::variant implementation in the gcc-10 branch.
    
            * include/std/variant (__same_types, __check_visitor_results):
            Remove.

Diff:
---
 libstdc++-v3/include/std/variant | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/libstdc++-v3/include/std/variant b/libstdc++-v3/include/std/variant
index 5f76d76490e..660b7fbc31c 100644
--- a/libstdc++-v3/include/std/variant
+++ b/libstdc++-v3/include/std/variant
@@ -1061,17 +1061,6 @@ namespace __variant
     using __visit_result_t
       = invoke_result_t<_Visitor, __get_t<0, _Variants>...>;
 
-  template<typename _Tp, typename... _Types>
-    constexpr inline bool __same_types = (is_same_v<_Tp, _Types> && ...);
-
-  template <typename _Visitor, typename _Variant, size_t... _Idxs>
-    constexpr bool __check_visitor_results(std::index_sequence<_Idxs...>)
-    {
-      return __same_types<
-	invoke_result_t<_Visitor, __get_t<_Idxs, _Variant>>...
-	>;
-    }
-
 } // namespace __variant
 } // namespace __detail


More information about the Libstdc++-cvs mailing list