summaryrefslogtreecommitdiff
path: root/contrib/libc++/src/future.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-15 21:17:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-15 21:17:36 +0000
commitd72607e9e28bcdeca1cb370dd3bf119c7853576f (patch)
treec7ef11e9501df78a928c64bb92aa05baf56f5808 /contrib/libc++/src/future.cpp
parentf7e6516a1f4099194f051c570a3301dae90729da (diff)
parentf857581820d15e410e9945d2fcd5f7163be25a96 (diff)
Notes
Diffstat (limited to 'contrib/libc++/src/future.cpp')
-rw-r--r--contrib/libc++/src/future.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/libc++/src/future.cpp b/contrib/libc++/src/future.cpp
index 70919ab7df84..0c5c2c4488d2 100644
--- a/contrib/libc++/src/future.cpp
+++ b/contrib/libc++/src/future.cpp
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+#include "__config"
+
+#ifndef _LIBCPP_HAS_NO_THREADS
+
#include "future"
#include "string"
@@ -26,8 +30,13 @@ __future_error_category::name() const _NOEXCEPT
return "future";
}
+#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wswitch"
+#elif defined(__GNUC__) || defined(__GNUG__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wswitch"
+#endif
string
__future_error_category::message(int ev) const
@@ -50,7 +59,11 @@ __future_error_category::message(int ev) const
return string("unspecified future_errc value\n");
}
+#if defined(__clang__)
#pragma clang diagnostic pop
+#elif defined(__GNUC__) || defined(__GNUG__)
+#pragma GCC diagnostic pop
+#endif
const error_category&
future_category() _NOEXCEPT
@@ -289,3 +302,5 @@ shared_future<void>::operator=(const shared_future& __rhs)
}
_LIBCPP_END_NAMESPACE_STD
+
+#endif // !_LIBCPP_HAS_NO_THREADS