summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-23 13:16:26 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-23 14:43:26 (GMT)
commit491ddd570a752cf9bda85933bed0c6942e39b1f9 (patch)
tree10c25c1be8cc08d0497df1dccd56a10fbb30beee /3rdParty/Boost/src/libs/thread/src/future.cpp
parentda7d7a0ca71b80281aa9ff2526290b61ccb0cc60 (diff)
downloadswift-491ddd570a752cf9bda85933bed0c6942e39b1f9.zip
swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.tar.bz2
Update Boost to 1.52.0.
Change-Id: I1e56bea2600bf2ed9c5b3aba8c4f9d2a0f350e77
Diffstat (limited to '3rdParty/Boost/src/libs/thread/src/future.cpp')
-rwxr-xr-x3rdParty/Boost/src/libs/thread/src/future.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/libs/thread/src/future.cpp b/3rdParty/Boost/src/libs/thread/src/future.cpp
new file mode 100755
index 0000000..33980f5
--- /dev/null
+++ b/3rdParty/Boost/src/libs/thread/src/future.cpp
@@ -0,0 +1,61 @@
+// (C) Copyright 2012 Vicente J. Botet Escriba
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+#ifndef BOOST_NO_EXCEPTIONS
+
+
+#include <boost/thread/future.hpp>
+
+namespace boost
+{
+
+ namespace thread_detail
+ {
+
+ class future_error_category :
+ public boost::system::error_category
+ {
+ public:
+ virtual const char* name() const; //BOOST_NOEXCEPT;
+ virtual std::string message(int ev) const;
+ };
+
+ const char*
+ future_error_category::name() const //BOOST_NOEXCEPT
+ {
+ return "future";
+ }
+
+ std::string
+ future_error_category::message(int ev) const
+ {
+ switch (BOOST_SCOPED_ENUM_NATIVE(future_errc)(ev))
+ {
+ case future_errc::broken_promise:
+ return std::string("The associated promise has been destructed prior "
+ "to the associated state becoming ready.");
+ case future_errc::future_already_retrieved:
+ return std::string("The future has already been retrieved from "
+ "the promise or packaged_task.");
+ case future_errc::promise_already_satisfied:
+ return std::string("The state of the promise has already been set.");
+ case future_errc::no_state:
+ return std::string("Operation not permitted on an object without "
+ "an associated state.");
+ }
+ return std::string("unspecified future_errc value\n");
+ }
+ }
+
+ const system::error_category&
+ future_category() BOOST_NOEXCEPT
+ {
+ static thread_detail::future_error_category f;
+ return f;
+ }
+
+}
+#endif