Date
2010-10-21.18:28:33
Message id
3838

Content

Proposed resolution:

Change System error support [syserr] as indicated:

namespace posix_error {
  enum posix_errno class errc {
    address_family_not_supported, // EAFNOSUPPORT
    ...
    wrong_protocol_type, // EPROTOTYPE
  };
} // namespace posix_error

template <> struct is_error_condition_enum<posix_error::posix_errno errc>
  : public true_type {}

namespace posix_error {
  error_code make_error_code(posix_errno errc e);
  error_condition make_error_condition(posix_errno errc e);
} // namespace posix_error

Change System error support [syserr] :

The is_error_code_enum and is_error_condition_enum templates may be specialized for user-defined types to indicate that such a type is eligible for class error_code and class error_condition automatic conversions, respectively.

Change System error support [syserr] and its subsections:

  • remove all occurrences of posix_error::
  • change all instances of posix_errno to errc
  • change all instances of posix_category to generic_category
  • change all instances of get_posix_category to get_generic_category

Change Error category objects [syserr.errcat.objects], paragraph 2:

Remarks: The object's default_error_condition and equivalent virtual functions shall behave as specified for the class error_category. The object's name virtual function shall return a pointer to the string "POSIX" "generic".

Change [syserr.errcode.nonmembers] Class error_code non-member functions as indicated:

error_code make_error_code(posix_errno errc e);

Returns: error_code(static_cast<int>(e), posixgeneric_category).

Change [syserr.errcondition.nonmembers] Class error_condition non-member functions as indicated:

error_condition make_error_condition(posix_errno errc e);

Returns: error_condition(static_cast<int>(e), posixgeneric_category).