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:
@@ -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
|
||||
|
Reference in New Issue
Block a user