Getting started on <future>

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@112061 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2010-08-25 17:32:05 +00:00
parent ef0036c5aa
commit a652172d86
13 changed files with 376 additions and 0 deletions

View File

@@ -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