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)
#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;
{
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.
};
template<typename _Tp>
- class atomic<shared_ptr<_Tp>>
+ struct atomic<shared_ptr<_Tp>>
{
public:
using value_type = shared_ptr<_Tp>;
};
template<typename _Tp>
- class atomic<weak_ptr<_Tp>>
+ struct atomic<weak_ptr<_Tp>>
{
public:
using value_type = weak_ptr<_Tp>;
= _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>
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>
{ 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;
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
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;