diff options
Diffstat (limited to 'libcxx/include')
| -rw-r--r-- | libcxx/include/future | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libcxx/include/future b/libcxx/include/future index 54b751f1a1e..c8986489d6e 100644 --- a/libcxx/include/future +++ b/libcxx/include/future @@ -463,6 +463,8 @@ enum _ { }; +template <> struct is_error_code_enum<future_errc> : public true_type {}; + //enum class launch struct launch { @@ -495,6 +497,32 @@ enum _ { }; +const error_category& future_category(); + +inline _LIBCPP_INLINE_VISIBILITY +error_code +make_error_code(future_errc __e) +{ + return error_code(static_cast<int>(__e), future_category()); +} + +inline _LIBCPP_INLINE_VISIBILITY +error_condition +make_error_condition(future_errc __e) +{ + return error_condition(static_cast<int>(__e), future_category()); +} + +class future_error + : public logic_error +{ + error_code __ec_; +public: + future_error(error_code __ec); + + const error_code& code() const throw() {return __ec_;} +}; + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_FUTURE |

