libstdc++: Fix -Wdeprecated-declarations warnings
libstdc++-v3/ChangeLog: * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&)) (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress warnings for uses of std::auto_ptr. * include/experimental/type_traits (is_literal_type_v): Likewise, for use of std::is_literal_type. * include/std/condition_variable (condition_variable_any::_Unlock): Likewise, for use of std::uncaught_exception.
This commit is contained in:
parent
b6b9fd4af9
commit
0943b55817
3 changed files with 10 additions and 1 deletions
|
@ -137,10 +137,13 @@ inline namespace fundamentals_v2
|
|||
: _Base_type(__r) { }
|
||||
|
||||
#if _GLIBCXX_USE_DEPRECATED
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
template<typename _Tp1, typename = _Compatible<_Tp1>>
|
||||
shared_ptr(std::auto_ptr<_Tp1>&& __r)
|
||||
: _Base_type(std::move(__r))
|
||||
{ _M_enable_shared_from_this_with(static_cast<_Tp1*>(this->get())); }
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
template<typename _Tp1, typename _Del,
|
||||
|
@ -187,6 +190,8 @@ inline namespace fundamentals_v2
|
|||
}
|
||||
|
||||
#if _GLIBCXX_USE_DEPRECATED
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
template<typename _Tp1>
|
||||
_Compatible<_Tp1, shared_ptr&>
|
||||
operator=(std::auto_ptr<_Tp1>&& __r)
|
||||
|
@ -194,6 +199,7 @@ inline namespace fundamentals_v2
|
|||
__shared_ptr<_Tp>::operator=(std::move(__r));
|
||||
return *this;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
template <typename _Tp1, typename _Del>
|
||||
|
|
|
@ -114,9 +114,9 @@ template <typename _Tp>
|
|||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
template <typename _Tp>
|
||||
constexpr bool is_pod_v = is_pod<_Tp>::value;
|
||||
#pragma GCC diagnostic pop
|
||||
template <typename _Tp>
|
||||
constexpr bool is_literal_type_v = is_literal_type<_Tp>::value;
|
||||
#pragma GCC diagnostic pop
|
||||
template <typename _Tp>
|
||||
constexpr bool is_empty_v = is_empty<_Tp>::value;
|
||||
template <typename _Tp>
|
||||
|
|
|
@ -266,6 +266,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
{
|
||||
explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); }
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
~_Unlock() noexcept(false)
|
||||
{
|
||||
if (uncaught_exception())
|
||||
|
@ -280,6 +282,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
else
|
||||
_M_lock.lock();
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
_Unlock(const _Unlock&) = delete;
|
||||
_Unlock& operator=(const _Unlock&) = delete;
|
||||
|
|
Loading…
Add table
Reference in a new issue