]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix some -Wmismatched-tags warnings
authorJonathan Wakely <jwakely@redhat.com>
Tue, 8 Aug 2023 21:07:29 +0000 (22:07 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 18 Mar 2024 11:08:10 +0000 (11:08 +0000)
libstdc++-v3/ChangeLog:

* include/bits/shared_ptr_atomic.h (atomic): Change class-head
to struct.
* include/bits/stl_tree.h (_Rb_tree_merge_helper): Change
class-head to struct in friend declaration.
* include/std/future (_Task_state_base, _Task_state): Likewise.
* include/std/scoped_allocator (__inner_type_impl): Likewise.
* include/std/valarray (_BinClos, _SClos, _GClos, _IClos)
(_ValFunClos, _RefFunClos): Change class-head to struct.

(cherry picked from commit 5b46eacc4949ec62ee718b172cf8eb056ff27654)

libstdc++-v3/include/bits/shared_ptr_atomic.h
libstdc++-v3/include/bits/stl_tree.h
libstdc++-v3/include/std/future
libstdc++-v3/include/std/scoped_allocator
libstdc++-v3/include/std/valarray

index 94570cd3ab3c90bf7e6f28949f169cd6a482ee78..e903fe89424d5344fc9f356d07192622cc35218f 100644 (file)
@@ -356,7 +356,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #if __cplusplus >= 202002L
 # define __cpp_lib_atomic_shared_ptr 201711L
   template<typename _Tp>
-    class atomic;
+    struct atomic;
 
   template<typename _Up>
     static constexpr bool __is_shared_ptr = false;
@@ -368,7 +368,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     {
       using value_type = _Tp;
 
-      friend class atomic<_Tp>;
+      friend struct atomic<_Tp>;
 
       // An atomic version of __shared_count<> and __weak_count<>.
       // Stores a _Sp_counted_base<>* but uses the LSB as a lock.
@@ -602,7 +602,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     };
 
   template<typename _Tp>
-    class atomic<shared_ptr<_Tp>>
+    struct atomic<shared_ptr<_Tp>>
     {
     public:
       using value_type = shared_ptr<_Tp>;
@@ -725,7 +725,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     };
 
   template<typename _Tp>
-    class atomic<weak_ptr<_Tp>>
+    struct atomic<weak_ptr<_Tp>>
     {
     public:
       using value_type = weak_ptr<_Tp>;
index 7a352c17b225da88f2b35287c56442bc26209970..6ced03252bc205742d599ee26be51816be68b00c 100644 (file)
@@ -1555,7 +1555,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
          = _Rb_tree<_Key, _Val, _KeyOfValue, _Compare2, _Alloc>;
 
       template<typename, typename>
-       friend class _Rb_tree_merge_helper;
+       friend struct _Rb_tree_merge_helper;
 
       /// Merge from a compatible container into one with unique keys.
       template<typename _Compare2>
index a1b2d7f1d3afb0c7a372736e7f381277074ef927..f1fa16c86490a975667a4f955be345d80f18f44e 100644 (file)
@@ -623,10 +623,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       class _Async_state_impl;
 
     template<typename _Signature>
-      class _Task_state_base;
+      struct _Task_state_base;
 
     template<typename _Fn, typename _Alloc, typename _Signature>
-      class _Task_state;
+      struct _Task_state;
 
     template<typename _Res_ptr, typename _Fn,
             typename _Res = typename _Res_ptr::element_type::result_type>
index f2e3ed9f7833b80a72e0c0c6761dfece62baaf22..8ad4c90b694da3344015bdcc8bef7fc2797f4a93 100644 (file)
@@ -165,7 +165,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       { return _M_inner == __other._M_inner; }
 
     private:
-      template<typename...> friend class __inner_type_impl;
+      template<typename...> friend struct __inner_type_impl;
       template<typename, typename...> friend class scoped_allocator_adaptor;
 
       __type _M_inner;
@@ -187,7 +187,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
         friend class scoped_allocator_adaptor;
 
       template<typename...>
-        friend class __inner_type_impl;
+       friend struct __inner_type_impl;
 
       tuple<const _OuterAlloc&, const _InnerAllocs&...>
       _M_tie() const noexcept
index 6f800d1b367e48f62f6e7eb95741429dc84071c6..32e6e7e8a76b17fd3656c8392cc28cf04b3ad3ba 100644 (file)
@@ -60,22 +60,22 @@ namespace __detail
         template<class, class> class _Meta1,
         template<class, class> class _Meta2,
         class _Dom1, class _Dom2>
-    class _BinClos;
+    struct _BinClos;
 
   template<template<class, class> class _Meta, class _Dom>
-    class _SClos;
+    struct _SClos;
 
   template<template<class, class> class _Meta, class _Dom>
-    class _GClos;
+    struct _GClos;
 
   template<template<class, class> class _Meta, class _Dom>
-    class _IClos;
+    struct _IClos;
 
   template<template<class, class> class _Meta, class _Dom>
-    class _ValFunClos;
+    struct _ValFunClos;
 
   template<template<class, class> class _Meta, class _Dom>
-    class _RefFunClos;
+    struct _RefFunClos;
 } // namespace __detail
 
   using __detail::_UnClos;