noexcept for <memory>.  I've added a few extension noexcept to:  allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const.  My rationale was:  If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept.  We're all a little new to noexcept, so things like this are to be expected.  Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|.  And fixed a test case for is_nothrow_destructible.  Destructors are now noexcept by default|

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132261 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/future b/include/future
index 471e1f2..90eb6e4 100644
--- a/include/future
+++ b/include/future
@@ -463,7 +463,7 @@
     mutable condition_variable __cv_;
     unsigned __state_;
 
-    virtual void __on_zero_shared();
+    virtual void __on_zero_shared() _NOEXCEPT;
     void __sub_wait(unique_lock<mutex>& __lk);
 public:
     enum
@@ -543,7 +543,7 @@
 protected:
     _U __value_;
 
-    virtual void __on_zero_shared();
+    virtual void __on_zero_shared() _NOEXCEPT;
 public:
 
     template <class _Arg>
@@ -566,7 +566,7 @@
 
 template <class _R>
 void
-__assoc_state<_R>::__on_zero_shared()
+__assoc_state<_R>::__on_zero_shared() _NOEXCEPT
 {
     if (this->__state_ & base::__constructed)
         reinterpret_cast<_R*>(&__value_)->~_R();
@@ -640,7 +640,7 @@
 protected:
     _U __value_;
 
-    virtual void __on_zero_shared();
+    virtual void __on_zero_shared() _NOEXCEPT;
 public:
 
     void set_value(_R& __arg);
@@ -651,7 +651,7 @@
 
 template <class _R>
 void
-__assoc_state<_R&>::__on_zero_shared()
+__assoc_state<_R&>::__on_zero_shared() _NOEXCEPT
 {
     delete this;
 }
@@ -700,7 +700,7 @@
     typedef __assoc_state<_R> base;
     _Alloc __alloc_;
 
-    virtual void __on_zero_shared();
+    virtual void __on_zero_shared() _NOEXCEPT;
 public:
     _LIBCPP_INLINE_VISIBILITY
     explicit __assoc_state_alloc(const _Alloc& __a)
@@ -709,7 +709,7 @@
 
 template <class _R, class _Alloc>
 void
-__assoc_state_alloc<_R, _Alloc>::__on_zero_shared()
+__assoc_state_alloc<_R, _Alloc>::__on_zero_shared() _NOEXCEPT
 {
     if (this->__state_ & base::__constructed)
         reinterpret_cast<_R*>(&this->__value_)->~_R();
@@ -725,7 +725,7 @@
     typedef __assoc_state<_R&> base;
     _Alloc __alloc_;
 
-    virtual void __on_zero_shared();
+    virtual void __on_zero_shared() _NOEXCEPT;
 public:
     _LIBCPP_INLINE_VISIBILITY
     explicit __assoc_state_alloc(const _Alloc& __a)
@@ -734,7 +734,7 @@
 
 template <class _R, class _Alloc>
 void
-__assoc_state_alloc<_R&, _Alloc>::__on_zero_shared()
+__assoc_state_alloc<_R&, _Alloc>::__on_zero_shared() _NOEXCEPT
 {
     typename _Alloc::template rebind<__assoc_state_alloc>::other __a(__alloc_);
     this->~__assoc_state_alloc();
@@ -748,7 +748,7 @@
     typedef __assoc_sub_state base;
     _Alloc __alloc_;
 
-    virtual void __on_zero_shared();
+    virtual void __on_zero_shared() _NOEXCEPT;
 public:
     _LIBCPP_INLINE_VISIBILITY
     explicit __assoc_sub_state_alloc(const _Alloc& __a)
@@ -757,7 +757,7 @@
 
 template <class _Alloc>
 void
-__assoc_sub_state_alloc<_Alloc>::__on_zero_shared()
+__assoc_sub_state_alloc<_Alloc>::__on_zero_shared() _NOEXCEPT
 {
     this->~base();
     typename _Alloc::template rebind<__assoc_sub_state_alloc>::other __a(__alloc_);
@@ -866,7 +866,7 @@
 
     _F __func_;
 
-    virtual void __on_zero_shared();
+    virtual void __on_zero_shared() _NOEXCEPT;
 public:
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     explicit __async_assoc_state(_F&& __f);
@@ -906,7 +906,7 @@
 
 template <class _R, class _F>
 void
-__async_assoc_state<_R, _F>::__on_zero_shared()
+__async_assoc_state<_R, _F>::__on_zero_shared() _NOEXCEPT
 {
     this->wait();
     base::__on_zero_shared();
@@ -920,7 +920,7 @@
 
     _F __func_;
 
-    virtual void __on_zero_shared();
+    virtual void __on_zero_shared() _NOEXCEPT;
 public:
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     explicit __async_assoc_state(_F&& __f);
@@ -961,7 +961,7 @@
 
 template <class _F>
 void
-__async_assoc_state<void, _F>::__on_zero_shared()
+__async_assoc_state<void, _F>::__on_zero_shared() _NOEXCEPT
 {
     this->wait();
     base::__on_zero_shared();