From Jason Turner

[ios::failure]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmphwll810d/{from.md → to.md} +12 -2
tmp/tmphwll810d/{from.md → to.md} RENAMED
@@ -8,22 +8,32 @@ namespace std {
8
  explicit failure(const char* msg, const error_code& ec = io_errc::stream);
9
  };
10
  }
11
  ```
12
 
 
 
 
 
 
 
 
 
13
  The class `failure` defines the base class for the types of all objects
14
  thrown as exceptions, by functions in the iostreams library, to report
15
  errors detected during stream buffer operations.
16
 
17
  When throwing `ios_base::failure` exceptions, implementations should
18
  provide values of `ec` that identify the specific reason for the
19
- failure. Errors arising from the operating system would typically be
 
 
20
  reported as `system_category()` errors with an error value of the error
21
  number reported by the operating system. Errors arising from within the
22
  stream library would typically be reported as
23
  `error_code(io_errc::stream,
24
- iostream_category())`.
25
 
26
  ``` cpp
27
  explicit failure(const string& msg, const error_code& ec = io_errc::stream);
28
  ```
29
 
 
8
  explicit failure(const char* msg, const error_code& ec = io_errc::stream);
9
  };
10
  }
11
  ```
12
 
13
+ An implementation is permitted to define `ios_base::failure` as a
14
+ synonym for a class with equivalent functionality to class
15
+ `ios_base::failure` shown in this subclause.
16
+
17
+ [*Note 1*: When `ios_base::failure` is a synonym for another type it
18
+ shall provide a nested type `failure`, to emulate the injected class
19
+ name. — *end note*]
20
+
21
  The class `failure` defines the base class for the types of all objects
22
  thrown as exceptions, by functions in the iostreams library, to report
23
  errors detected during stream buffer operations.
24
 
25
  When throwing `ios_base::failure` exceptions, implementations should
26
  provide values of `ec` that identify the specific reason for the
27
+ failure.
28
+
29
+ [*Note 2*: Errors arising from the operating system would typically be
30
  reported as `system_category()` errors with an error value of the error
31
  number reported by the operating system. Errors arising from within the
32
  stream library would typically be reported as
33
  `error_code(io_errc::stream,
34
+ iostream_category())`. — *end note*]
35
 
36
  ``` cpp
37
  explicit failure(const string& msg, const error_code& ec = io_errc::stream);
38
  ```
39