LWG Issue 2087: iostream_category() and noexcept

llvm-svn: 192545
This commit is contained in:
Marshall Clow 2013-10-12 22:49:56 +00:00
parent d58daf9433
commit c3776b1ce0
2 changed files with 7 additions and 7 deletions

View File

@ -203,9 +203,9 @@ enum class io_errc
}; };
concept_map ErrorCodeEnum<io_errc> { }; concept_map ErrorCodeEnum<io_errc> { };
error_code make_error_code(io_errc e); error_code make_error_code(io_errc e) noexcept;
error_condition make_error_condition(io_errc e); error_condition make_error_condition(io_errc e) noexcept;
storage-class-specifier const error_category& iostream_category; storage-class-specifier const error_category& iostream_category() noexcept;
} // std } // std
@ -396,18 +396,18 @@ struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum<io_errc::__lx> : public true_typ
#endif #endif
_LIBCPP_FUNC_VIS _LIBCPP_FUNC_VIS
const error_category& iostream_category(); const error_category& iostream_category() _NOEXCEPT;
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
error_code error_code
make_error_code(io_errc __e) make_error_code(io_errc __e) _NOEXCEPT
{ {
return error_code(static_cast<int>(__e), iostream_category()); return error_code(static_cast<int>(__e), iostream_category());
} }
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
error_condition error_condition
make_error_condition(io_errc __e) make_error_condition(io_errc __e) _NOEXCEPT
{ {
return error_condition(static_cast<int>(__e), iostream_category()); return error_condition(static_cast<int>(__e), iostream_category());
} }

View File

@ -63,7 +63,7 @@ __iostream_category::message(int ev) const
} }
const error_category& const error_category&
iostream_category() iostream_category() _NOEXCEPT
{ {
static __iostream_category s; static __iostream_category s;
return s; return s;