diff options
| author | Howard Hinnant <hhinnant@apple.com> | 2010-08-25 17:32:05 +0000 |
|---|---|---|
| committer | Howard Hinnant <hhinnant@apple.com> | 2010-08-25 17:32:05 +0000 |
| commit | dae3481b28ad0bedd4c5b98385af499cbbe2a10b (patch) | |
| tree | bb682a9c2b54b54914a58fee5f42fc4c333026b9 /libcxx/include | |
| parent | f1f2133ac088f732be5850b5b53439c9356e1ff1 (diff) | |
| download | bcm5719-llvm-dae3481b28ad0bedd4c5b98385af499cbbe2a10b.tar.gz bcm5719-llvm-dae3481b28ad0bedd4c5b98385af499cbbe2a10b.zip | |
Getting started on <future>
llvm-svn: 112061
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 |

