diff options
Diffstat (limited to 'libcxx/include/system_error')
-rw-r--r-- | libcxx/include/system_error | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libcxx/include/system_error b/libcxx/include/system_error index faaeaa06d05..c7e73d4ab82 100644 --- a/libcxx/include/system_error +++ b/libcxx/include/system_error @@ -219,6 +219,7 @@ bool operator!=(const error_condition& lhs, const error_code& rhs) noexcept; bool operator!=(const error_condition& lhs, const error_condition& rhs) noexcept; template <> struct hash<std::error_code>; +template <> struct hash<std::error_condition>; } // std @@ -629,6 +630,17 @@ struct _LIBCPP_TYPE_VIS_ONLY hash<error_code> } }; +template <> +struct _LIBCPP_TYPE_VIS_ONLY hash<error_condition> + : public unary_function<error_condition, size_t> +{ + _LIBCPP_INLINE_VISIBILITY + size_t operator()(const error_condition& __ec) const _NOEXCEPT + { + return static_cast<size_t>(__ec.value()); + } +}; + // system_error class _LIBCPP_TYPE_VIS system_error |