Clean up libstdc++ includes slightly.
authorJonathan Wakely <jwakely@redhat.com>
Thu, 3 Sep 2015 20:40:03 +0000 (21:40 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 3 Sep 2015 20:40:03 +0000 (21:40 +0100)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/shared_ptr_base.h
libstdc++-v3/include/std/condition_variable
libstdc++-v3/include/std/mutex
libstdc++-v3/include/std/shared_mutex

index b0e0af8bcb3931183f512cc8fd05c820a112f42d..ced20a31a5a8aa72bf1a3ad767621119b209eaaf 100644 (file)
@@ -1,5 +1,11 @@
 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
        * src/c++11/debug.cc (_S_debug_messages): Make array const.
 
index 820edcb5d4b09a00cd9a685a9b4f63ac7eee8445..f2f577b91159d696a02538df612ed3fba4498432 100644 (file)
@@ -49,6 +49,7 @@
 #ifndef _SHARED_PTR_BASE_H
 #define _SHARED_PTR_BASE_H 1
 
+#include <typeinfo>
 #include <bits/allocated_ptr.h>
 #include <ext/aligned_buffer.h>
 
@@ -67,8 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   class bad_weak_ptr : public std::exception
   {
   public:
-    virtual char const*
-    what() const noexcept;
+    virtual char const* what() const noexcept;
 
     virtual ~bad_weak_ptr() noexcept;    
   };
index f7da017aa63ebe67d42a7aaef81409134a64d754..fbed043f3c743b2062e14edbc45fecae67570f3d 100644 (file)
@@ -42,6 +42,7 @@
 #include <bits/allocator.h>
 #include <bits/unique_ptr.h>
 #include <bits/shared_ptr.h>
+#include <bits/cxxabi_forced.h>
 
 #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
 
index 790508c65c235300cffc593b974acf79d02ef4dd..fbf17405b7b427ae7d31862867f3d464908de27f 100644 (file)
@@ -44,7 +44,6 @@
 #include <bits/functexcept.h>
 #include <bits/gthr.h>
 #include <bits/move.h> // for std::swap
-#include <bits/cxxabi_forced.h>
 
 #ifdef _GLIBCXX_USE_C99_STDINT_TR1
 
index ae5f199cddef636e6e4998c67a764b19e03e96ea..69107cc495248461ecc975b6b5d88aabb8af4366 100644 (file)
@@ -36,7 +36,6 @@
 #else
 
 #include <bits/c++config.h>
-#include <mutex>
 #include <condition_variable>
 #include <bits/functexcept.h>
 
@@ -80,7 +79,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     {
       int __ret = pthread_rwlock_init(&_M_rwlock, NULL);
       if (__ret == ENOMEM)
-       throw bad_alloc();
+       __throw_bad_alloc();
       else if (__ret == EAGAIN)
        __throw_system_error(int(errc::resource_unavailable_try_again));
       else if (__ret == EPERM)