From Jason Turner

[syserr.errcat]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpp8nlllul/{from.md → to.md} +11 -9
tmp/tmpp8nlllul/{from.md → to.md} RENAMED
@@ -7,13 +7,14 @@ identify the source and encoding of a particular category of error code.
7
  Classes may be derived from `error_category` to support categories of
8
  errors in addition to those defined in this document. Such classes shall
9
  behave as specified in subclause  [[syserr.errcat]].
10
 
11
  [*Note 1*: `error_category` objects are passed by reference, and two
12
- such objects are equal if they have the same address. This means that
13
- applications using custom `error_category` types should create a single
14
- object of each such type. *end note*]
 
15
 
16
  ``` cpp
17
  namespace std {
18
  class error_category {
19
  public:
@@ -139,16 +140,17 @@ the same object.
139
  *Remarks:* The object’s `equivalent` virtual functions shall behave as
140
  specified for class `error_category`. The object’s `name` virtual
141
  function shall return a pointer to the string `"system"`. The object’s
142
  `default_error_condition` virtual function shall behave as follows:
143
 
144
- If the argument `ev` corresponds to a POSIX `errno` value `posv`, the
145
- function shall return `error_condition(posv, generic_category())`.
146
- Otherwise, the function shall return
147
- `error_condition(ev, system_category())`. What constitutes
 
148
  correspondence for any given operating system is unspecified.
149
 
150
  [*Note 1*: The number of potential system error codes is large and
151
- unbounded, and some may not correspond to any POSIX `errno` value. Thus
152
- implementations are given latitude in determining
153
  correspondence. — *end note*]
154
 
 
7
  Classes may be derived from `error_category` to support categories of
8
  errors in addition to those defined in this document. Such classes shall
9
  behave as specified in subclause  [[syserr.errcat]].
10
 
11
  [*Note 1*: `error_category` objects are passed by reference, and two
12
+ such objects are equal if they have the same address. If there is more
13
+ than a single object of a custom `error_category` type, such equality
14
+ comparisons can evaluate to `false` even for objects holding the same
15
+ value. — *end note*]
16
 
17
  ``` cpp
18
  namespace std {
19
  class error_category {
20
  public:
 
140
  *Remarks:* The object’s `equivalent` virtual functions shall behave as
141
  specified for class `error_category`. The object’s `name` virtual
142
  function shall return a pointer to the string `"system"`. The object’s
143
  `default_error_condition` virtual function shall behave as follows:
144
 
145
+ If the argument `ev` is equal to 0, the function returns
146
+ `error_condition(0, generic_category())`. Otherwise, if `ev` corresponds
147
+ to a POSIX `errno` value `pxv`, the function returns
148
+ `error_condition(pxv, generic_category())`. Otherwise, the function
149
+ returns `error_condition(ev, system_category())`. What constitutes
150
  correspondence for any given operating system is unspecified.
151
 
152
  [*Note 1*: The number of potential system error codes is large and
153
+ unbounded, and some might not correspond to any POSIX `errno` value.
154
+ Thus implementations are given latitude in determining
155
  correspondence. — *end note*]
156