diff --git a/include/thread b/include/thread
index 23b1915..b6b7000 100644
--- a/include/thread
+++ b/include/thread
@@ -26,41 +26,41 @@
     class id;
     typedef pthread_t native_handle_type;
 
-    thread();
+    thread() noexcept;
     template <class F, class ...Args> explicit thread(F&& f, Args&&... args);
     ~thread();
 
     thread(const thread&) = delete;
-    thread(thread&& t);
+    thread(thread&& t) noexcept;
 
     thread& operator=(const thread&) = delete;
-    thread& operator=(thread&& t);
+    thread& operator=(thread&& t) noexcept;
 
-    void swap(thread& t);
+    void swap(thread& t) noexcept;
 
-    bool joinable() const;
+    bool joinable() const noexcept;
     void join();
     void detach();
-    id get_id() const;
+    id get_id() const noexcept;
     native_handle_type native_handle();
 
-    static unsigned hardware_concurrency();
+    static unsigned hardware_concurrency() noexcept;
 };
 
-void swap(thread& x, thread& y);
+void swap(thread& x, thread& y) noexcept;
 
 class thread::id
 {
 public:
-    id();
+    id() noexcept;
 };
 
-bool operator==(thread::id x, thread::id y);
-bool operator!=(thread::id x, thread::id y);
-bool operator< (thread::id x, thread::id y);
-bool operator<=(thread::id x, thread::id y);
-bool operator> (thread::id x, thread::id y);
-bool operator>=(thread::id x, thread::id y);
+bool operator==(thread::id x, thread::id y) noexcept;
+bool operator!=(thread::id x, thread::id y) noexcept;
+bool operator< (thread::id x, thread::id y) noexcept;
+bool operator<=(thread::id x, thread::id y) noexcept;
+bool operator> (thread::id x, thread::id y) noexcept;
+bool operator>=(thread::id x, thread::id y) noexcept;
 
 template<class charT, class traits>
 basic_ostream<charT, traits>&
@@ -69,9 +69,9 @@
 namespace this_thread
 {
 
-thread::id get_id();
+thread::id get_id() noexcept;
 
-void yield();
+void yield() noexcept;
 
 template <class Clock, class Duration>
 void sleep_until(const chrono::time_point<Clock, Duration>& abs_time);
@@ -179,7 +179,7 @@
 namespace this_thread
 {
 
-__thread_id get_id();
+__thread_id get_id() _NOEXCEPT;
 
 }  // this_thread
 
@@ -195,25 +195,25 @@
 
 public:
     _LIBCPP_INLINE_VISIBILITY
-    __thread_id() : __id_(0) {}
+    __thread_id() _NOEXCEPT : __id_(0) {}
 
     friend _LIBCPP_INLINE_VISIBILITY
-        bool operator==(__thread_id __x, __thread_id __y)
+        bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT
         {return __x.__id_ == __y.__id_;}
     friend _LIBCPP_INLINE_VISIBILITY
-        bool operator!=(__thread_id __x, __thread_id __y)
+        bool operator!=(__thread_id __x, __thread_id __y) _NOEXCEPT
         {return !(__x == __y);}
     friend _LIBCPP_INLINE_VISIBILITY
-        bool operator< (__thread_id __x, __thread_id __y)
+        bool operator< (__thread_id __x, __thread_id __y) _NOEXCEPT
         {return __x.__id_ < __y.__id_;}
     friend _LIBCPP_INLINE_VISIBILITY
-        bool operator<=(__thread_id __x, __thread_id __y)
+        bool operator<=(__thread_id __x, __thread_id __y) _NOEXCEPT
         {return !(__y < __x);}
     friend _LIBCPP_INLINE_VISIBILITY
-        bool operator> (__thread_id __x, __thread_id __y)
+        bool operator> (__thread_id __x, __thread_id __y) _NOEXCEPT
         {return   __y < __x ;}
     friend _LIBCPP_INLINE_VISIBILITY
-        bool operator>=(__thread_id __x, __thread_id __y)
+        bool operator>=(__thread_id __x, __thread_id __y) _NOEXCEPT
         {return !(__x < __y);}
 
     template<class _CharT, class _Traits>
@@ -248,7 +248,7 @@
 
 inline _LIBCPP_INLINE_VISIBILITY
 __thread_id
-get_id()
+get_id() _NOEXCEPT
 {
     return pthread_self();
 }
@@ -266,7 +266,7 @@
     typedef pthread_t native_handle_type;
 
     _LIBCPP_INLINE_VISIBILITY
-    thread() : __t_(0) {}
+    thread() _NOEXCEPT : __t_(0) {}
 #ifndef _LIBCPP_HAS_NO_VARIADICS
     template <class _Fp, class ..._Args,
               class = typename enable_if
@@ -282,23 +282,23 @@
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     _LIBCPP_INLINE_VISIBILITY
-    thread(thread&& __t) : __t_(__t.__t_) {__t.__t_ = 0;}
-    thread& operator=(thread&& __t);
+    thread(thread&& __t) _NOEXCEPT : __t_(__t.__t_) {__t.__t_ = 0;}
+    thread& operator=(thread&& __t) _NOEXCEPT;
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
     _LIBCPP_INLINE_VISIBILITY
-    void swap(thread& __t) {_VSTD::swap(__t_, __t.__t_);}
+    void swap(thread& __t) _NOEXCEPT {_VSTD::swap(__t_, __t.__t_);}
 
     _LIBCPP_INLINE_VISIBILITY
-    bool joinable() const {return __t_ != 0;}
+    bool joinable() const _NOEXCEPT {return __t_ != 0;}
     void join();
     void detach();
     _LIBCPP_INLINE_VISIBILITY
-    id get_id() const {return __t_;}
+    id get_id() const _NOEXCEPT {return __t_;}
     _LIBCPP_INLINE_VISIBILITY
-    native_handle_type native_handle() {return __t_;}
+    native_handle_type native_handle() _NOEXCEPT {return __t_;}
 
-    static unsigned hardware_concurrency();
+    static unsigned hardware_concurrency() _NOEXCEPT;
 };
 
 class __assoc_sub_state;
@@ -386,7 +386,7 @@
 
 inline _LIBCPP_INLINE_VISIBILITY
 thread&
-thread::operator=(thread&& __t)
+thread::operator=(thread&& __t) _NOEXCEPT
 {
     if (__t_ != 0)
         terminate();
@@ -398,7 +398,7 @@
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 inline _LIBCPP_INLINE_VISIBILITY
-void swap(thread& __x, thread& __y) {__x.swap(__y);}
+void swap(thread& __x, thread& __y) _NOEXCEPT {__x.swap(__y);}
 
 namespace this_thread
 {
@@ -438,7 +438,7 @@
 }
 
 inline _LIBCPP_INLINE_VISIBILITY
-void yield() {sched_yield();}
+void yield() _NOEXCEPT {sched_yield();}
 
 }  // this_thread
 
