annotate DEPENDENCIES/generic/include/boost/thread/futures/future_error_code.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents f46d142149f5
children
rev   line source
Chris@102 1 // (C) Copyright 2008-10 Anthony Williams
Chris@102 2 // (C) Copyright 2011-2012,2015 Vicente J. Botet Escriba
Chris@102 3 //
Chris@102 4 // Distributed under the Boost Software License, Version 1.0. (See
Chris@102 5 // accompanying file LICENSE_1_0.txt or copy at
Chris@102 6 // http://www.boost.org/LICENSE_1_0.txt)
Chris@102 7
Chris@102 8 #ifndef BOOST_THREAD_FUTURES_FUTURE_ERROR_CODE_HPP
Chris@102 9 #define BOOST_THREAD_FUTURES_FUTURE_ERROR_CODE_HPP
Chris@102 10
Chris@102 11 #include <boost/thread/detail/config.hpp>
Chris@102 12 #include <boost/core/scoped_enum.hpp>
Chris@102 13 #include <boost/system/error_code.hpp>
Chris@102 14 #include <boost/type_traits/integral_constant.hpp>
Chris@102 15
Chris@102 16 namespace boost
Chris@102 17 {
Chris@102 18
Chris@102 19 //enum class future_errc
Chris@102 20 BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_errc)
Chris@102 21 {
Chris@102 22 broken_promise = 1,
Chris@102 23 future_already_retrieved,
Chris@102 24 promise_already_satisfied,
Chris@102 25 no_state
Chris@102 26 }
Chris@102 27 BOOST_SCOPED_ENUM_DECLARE_END(future_errc)
Chris@102 28
Chris@102 29 namespace system
Chris@102 30 {
Chris@102 31 template <>
Chris@102 32 struct BOOST_SYMBOL_VISIBLE is_error_code_enum< ::boost::future_errc> : public true_type {};
Chris@102 33
Chris@102 34 #ifdef BOOST_NO_CXX11_SCOPED_ENUMS
Chris@102 35 template <>
Chris@102 36 struct BOOST_SYMBOL_VISIBLE is_error_code_enum< ::boost::future_errc::enum_type> : public true_type { };
Chris@102 37 #endif
Chris@102 38 } // system
Chris@102 39
Chris@102 40 BOOST_THREAD_DECL
Chris@102 41 const system::error_category& future_category() BOOST_NOEXCEPT;
Chris@102 42
Chris@102 43 namespace system
Chris@102 44 {
Chris@102 45 inline
Chris@102 46 error_code
Chris@102 47 make_error_code(future_errc e) BOOST_NOEXCEPT
Chris@102 48 {
Chris@102 49 return error_code(underlying_cast<int>(e), boost::future_category());
Chris@102 50 }
Chris@102 51
Chris@102 52 inline
Chris@102 53 error_condition
Chris@102 54 make_error_condition(future_errc e) BOOST_NOEXCEPT
Chris@102 55 {
Chris@102 56 return error_condition(underlying_cast<int>(e), boost::future_category());
Chris@102 57 }
Chris@102 58 } // system
Chris@102 59 } // boost
Chris@102 60
Chris@102 61 #endif // header