Add missing #ifndef _LIBCPP_NO_EXCEPTIONS around throw in include/thread.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178237 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2013-03-28 15:00:04 +00:00
parent 34d36f39b0
commit 2c0d3edf68

View File

@ -144,9 +144,11 @@ template <class _Tp>
__thread_specific_ptr<_Tp>::__thread_specific_ptr()
{
int __ec = pthread_key_create(&__key_, &__thread_specific_ptr::__at_thread_exit);
#ifndef _LIBCPP_NO_EXCEPTIONS
if (__ec)
throw system_error(error_code(__ec, system_category()),
"__thread_specific_ptr construction failed");
#endif
}
template <class _Tp>