diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2016-11-14 18:22:19 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2016-11-14 18:22:19 +0000 |
| commit | 1c7fe126ee16857243738ebc1dbaea69caffefb1 (patch) | |
| tree | 9ccb4a534b61893d510b4ab870a93892479b92a6 /libcxx/include/system_error | |
| parent | ccf2fa1cb64f8b292cfbe964905c4a802fb6dd87 (diff) | |
| download | bcm5719-llvm-1c7fe126ee16857243738ebc1dbaea69caffefb1.tar.gz bcm5719-llvm-1c7fe126ee16857243738ebc1dbaea69caffefb1.zip | |
Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted last week in Issaquah
llvm-svn: 286858
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 |

