]> 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>
Wed, 9 Aug 2023 14:19:15 +0000 (15:19 +0100)
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/chrono (tzdb_list::_Node): Likewise.
* 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.

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

index 3f921d311d69c6da6d1af7134a135b39a07ac3af..b56b8153a89f1aae3f077eb598823f4212fcd75c 100644 (file)
@@ -358,7 +358,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #if __cplusplus >= 202002L
 # define __cpp_lib_atomic_shared_ptr 201711L
   template<typename _Tp>
-    class atomic;
+    struct atomic;
 
   /**
    * @addtogroup pointer_abstractions
@@ -376,7 +376,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.
@@ -610,7 +610,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>;
@@ -733,7 +733,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 3c331fbc952ad2ede04135a4b30cdecee5d278fb..f870f3dfa5387a5ad0434d43a0cc7b855f2f647d 100644 (file)
@@ -1554,7 +1554,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 9b160488afa9da21bb106c2a6b410619166086ff..e63d6c71b4a97cb9e48ef764ff742e972724abe1 100644 (file)
@@ -2792,7 +2792,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
     private:
       friend const tzdb& reload_tzdb();
-      friend class tzdb_list::_Node;
+      friend struct tzdb_list::_Node;
 
       explicit time_zone_link(nullptr_t) { }
 
@@ -2896,7 +2896,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     private:
       explicit leap_second(seconds::rep __s) : _M_s(__s) { }
 
-      friend class tzdb_list::_Node;
+      friend struct tzdb_list::_Node;
 
       friend const tzdb& reload_tzdb();
 
@@ -2937,7 +2937,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     private:
       friend const tzdb& reload_tzdb();
       friend class time_zone;
-      friend class tzdb_list::_Node;
+      friend struct tzdb_list::_Node;
     };
 
     tzdb_list& get_tzdb_list();
index b94ae0b679b288f853c0f1d84cd1a83ae67f4979..c46ead742c30f838e1e6f49a7f56b2f7ac5acbf1 100644 (file)
@@ -625,10 +625,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 cb15c8cc7dde4a42a38039dd3918b922da4d9ab1..8af432ada425d635fee2b187f9bdb8da31caaf54 100644 (file)
@@ -164,7 +164,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;
@@ -186,7 +186,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 6bd23e0914b0d2aed16d4fbd8240b65857b81be7..f172db6c623eae0c27fb40a598aac1d29ea893f0 100644 (file)
@@ -62,22 +62,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;