Clean up libstdc++ includes slightly.
* include/bits/shared_ptr_base.h: Add required header. * include/std/condition_variable: Likewise. * include/std/mutex: Remove unused header. * include/std/shared_mutex: Remove redundant header. (shared_mutex::shared_mutex()): Replace throw with __throw_bad_alloc. From-SVN: r227469
This commit is contained in:
parent
433f6725ca
commit
c8c030589b
5 changed files with 10 additions and 5 deletions
|
@ -1,5 +1,11 @@
|
||||||
2015-09-03 Jonathan Wakely <jwakely@redhat.com>
|
2015-09-03 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
|
* include/bits/shared_ptr_base.h: Add required header.
|
||||||
|
* include/std/condition_variable: Likewise.
|
||||||
|
* include/std/mutex: Remove unused header.
|
||||||
|
* include/std/shared_mutex: Remove redundant header.
|
||||||
|
(shared_mutex::shared_mutex()): Replace throw with __throw_bad_alloc.
|
||||||
|
|
||||||
PR libstdc++/66902
|
PR libstdc++/66902
|
||||||
* src/c++11/debug.cc (_S_debug_messages): Make array const.
|
* src/c++11/debug.cc (_S_debug_messages): Make array const.
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
#ifndef _SHARED_PTR_BASE_H
|
#ifndef _SHARED_PTR_BASE_H
|
||||||
#define _SHARED_PTR_BASE_H 1
|
#define _SHARED_PTR_BASE_H 1
|
||||||
|
|
||||||
|
#include <typeinfo>
|
||||||
#include <bits/allocated_ptr.h>
|
#include <bits/allocated_ptr.h>
|
||||||
#include <ext/aligned_buffer.h>
|
#include <ext/aligned_buffer.h>
|
||||||
|
|
||||||
|
@ -67,8 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
class bad_weak_ptr : public std::exception
|
class bad_weak_ptr : public std::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual char const*
|
virtual char const* what() const noexcept;
|
||||||
what() const noexcept;
|
|
||||||
|
|
||||||
virtual ~bad_weak_ptr() noexcept;
|
virtual ~bad_weak_ptr() noexcept;
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include <bits/allocator.h>
|
#include <bits/allocator.h>
|
||||||
#include <bits/unique_ptr.h>
|
#include <bits/unique_ptr.h>
|
||||||
#include <bits/shared_ptr.h>
|
#include <bits/shared_ptr.h>
|
||||||
|
#include <bits/cxxabi_forced.h>
|
||||||
|
|
||||||
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
|
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,6 @@
|
||||||
#include <bits/functexcept.h>
|
#include <bits/functexcept.h>
|
||||||
#include <bits/gthr.h>
|
#include <bits/gthr.h>
|
||||||
#include <bits/move.h> // for std::swap
|
#include <bits/move.h> // for std::swap
|
||||||
#include <bits/cxxabi_forced.h>
|
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#include <bits/c++config.h>
|
#include <bits/c++config.h>
|
||||||
#include <mutex>
|
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
#include <bits/functexcept.h>
|
#include <bits/functexcept.h>
|
||||||
|
|
||||||
|
@ -80,7 +79,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
{
|
{
|
||||||
int __ret = pthread_rwlock_init(&_M_rwlock, NULL);
|
int __ret = pthread_rwlock_init(&_M_rwlock, NULL);
|
||||||
if (__ret == ENOMEM)
|
if (__ret == ENOMEM)
|
||||||
throw bad_alloc();
|
__throw_bad_alloc();
|
||||||
else if (__ret == EAGAIN)
|
else if (__ret == EAGAIN)
|
||||||
__throw_system_error(int(errc::resource_unavailable_try_again));
|
__throw_system_error(int(errc::resource_unavailable_try_again));
|
||||||
else if (__ret == EPERM)
|
else if (__ret == EPERM)
|
||||||
|
|
Loading…
Add table
Reference in a new issue