tmp/tmp2xas7s5j/{from.md → to.md}
RENAMED
|
@@ -151,11 +151,12 @@ have the same address. This means that applications using custom
|
|
| 151 |
|
| 152 |
``` cpp
|
| 153 |
namespace std {
|
| 154 |
class error_category {
|
| 155 |
public:
|
| 156 |
-
|
|
|
|
| 157 |
error_category(const error_category&) = delete;
|
| 158 |
error_category& operator=(const error_category&) = delete;
|
| 159 |
virtual const char* name() const noexcept = 0;
|
| 160 |
virtual error_condition default_error_condition(int ev) const noexcept;
|
| 161 |
virtual bool equivalent(int code, const error_condition& condition) const noexcept;
|
|
@@ -173,10 +174,16 @@ namespace std {
|
|
| 173 |
} // namespace std
|
| 174 |
```
|
| 175 |
|
| 176 |
#### Class `error_category` virtual members <a id="syserr.errcat.virtuals">[[syserr.errcat.virtuals]]</a>
|
| 177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
``` cpp
|
| 179 |
virtual const char* name() const noexcept = 0;
|
| 180 |
```
|
| 181 |
|
| 182 |
*Returns:* A string naming the error category.
|
|
@@ -205,10 +212,16 @@ virtual string message(int ev) const = 0;
|
|
| 205 |
|
| 206 |
*Returns:* A string that describes the error condition denoted by `ev`.
|
| 207 |
|
| 208 |
#### Class `error_category` non-virtual members <a id="syserr.errcat.nonvirtuals">[[syserr.errcat.nonvirtuals]]</a>
|
| 209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
``` cpp
|
| 211 |
bool operator==(const error_category& rhs) const noexcept;
|
| 212 |
```
|
| 213 |
|
| 214 |
*Returns:* `this == &rhs`.
|
|
@@ -633,12 +646,12 @@ bool operator!=(const error_condition& lhs, const error_condition& rhs) noexcept
|
|
| 633 |
|
| 634 |
``` cpp
|
| 635 |
template <> struct hash<error_code>;
|
| 636 |
```
|
| 637 |
|
| 638 |
-
|
| 639 |
-
|
| 640 |
|
| 641 |
### Class `system_error` <a id="syserr.syserr">[[syserr.syserr]]</a>
|
| 642 |
|
| 643 |
#### Class `system_error` overview <a id="syserr.syserr.overview">[[syserr.syserr.overview]]</a>
|
| 644 |
|
|
@@ -677,11 +690,11 @@ system_error(error_code ec, const string& what_arg);
|
|
| 677 |
|
| 678 |
*Effects:* Constructs an object of class `system_error`.
|
| 679 |
|
| 680 |
*Postconditions:* `code() == ec`.
|
| 681 |
|
| 682 |
-
string(what()).find(what_arg) != string::npos.
|
| 683 |
|
| 684 |
``` cpp
|
| 685 |
system_error(error_code ec, const char* what_arg);
|
| 686 |
```
|
| 687 |
|
|
@@ -717,11 +730,11 @@ system_error(int ev, const error_category& ecat,
|
|
| 717 |
|
| 718 |
*Effects:* Constructs an object of class `system_error`.
|
| 719 |
|
| 720 |
*Postconditions:* `code() == error_code(ev, ecat)`.
|
| 721 |
|
| 722 |
-
string(what()).find(what_arg) != string::npos.
|
| 723 |
|
| 724 |
``` cpp
|
| 725 |
system_error(int ev, const error_category& ecat);
|
| 726 |
```
|
| 727 |
|
|
|
|
| 151 |
|
| 152 |
``` cpp
|
| 153 |
namespace std {
|
| 154 |
class error_category {
|
| 155 |
public:
|
| 156 |
+
constexpr error_category() noexcept;
|
| 157 |
+
virtual ~error_category();
|
| 158 |
error_category(const error_category&) = delete;
|
| 159 |
error_category& operator=(const error_category&) = delete;
|
| 160 |
virtual const char* name() const noexcept = 0;
|
| 161 |
virtual error_condition default_error_condition(int ev) const noexcept;
|
| 162 |
virtual bool equivalent(int code, const error_condition& condition) const noexcept;
|
|
|
|
| 174 |
} // namespace std
|
| 175 |
```
|
| 176 |
|
| 177 |
#### Class `error_category` virtual members <a id="syserr.errcat.virtuals">[[syserr.errcat.virtuals]]</a>
|
| 178 |
|
| 179 |
+
``` cpp
|
| 180 |
+
virtual ~error_category();
|
| 181 |
+
```
|
| 182 |
+
|
| 183 |
+
*Effects:* Destroys an object of class `error_category`.
|
| 184 |
+
|
| 185 |
``` cpp
|
| 186 |
virtual const char* name() const noexcept = 0;
|
| 187 |
```
|
| 188 |
|
| 189 |
*Returns:* A string naming the error category.
|
|
|
|
| 212 |
|
| 213 |
*Returns:* A string that describes the error condition denoted by `ev`.
|
| 214 |
|
| 215 |
#### Class `error_category` non-virtual members <a id="syserr.errcat.nonvirtuals">[[syserr.errcat.nonvirtuals]]</a>
|
| 216 |
|
| 217 |
+
``` cpp
|
| 218 |
+
constexpr error_category() noexcept;
|
| 219 |
+
```
|
| 220 |
+
|
| 221 |
+
*Effects:* Constructs an object of class `error_category`.
|
| 222 |
+
|
| 223 |
``` cpp
|
| 224 |
bool operator==(const error_category& rhs) const noexcept;
|
| 225 |
```
|
| 226 |
|
| 227 |
*Returns:* `this == &rhs`.
|
|
|
|
| 646 |
|
| 647 |
``` cpp
|
| 648 |
template <> struct hash<error_code>;
|
| 649 |
```
|
| 650 |
|
| 651 |
+
The template specialization shall meet the requirements of class
|
| 652 |
+
template `hash` ([[unord.hash]]).
|
| 653 |
|
| 654 |
### Class `system_error` <a id="syserr.syserr">[[syserr.syserr]]</a>
|
| 655 |
|
| 656 |
#### Class `system_error` overview <a id="syserr.syserr.overview">[[syserr.syserr.overview]]</a>
|
| 657 |
|
|
|
|
| 690 |
|
| 691 |
*Effects:* Constructs an object of class `system_error`.
|
| 692 |
|
| 693 |
*Postconditions:* `code() == ec`.
|
| 694 |
|
| 695 |
+
`string(what()).find(what_arg) != string::npos`.
|
| 696 |
|
| 697 |
``` cpp
|
| 698 |
system_error(error_code ec, const char* what_arg);
|
| 699 |
```
|
| 700 |
|
|
|
|
| 730 |
|
| 731 |
*Effects:* Constructs an object of class `system_error`.
|
| 732 |
|
| 733 |
*Postconditions:* `code() == error_code(ev, ecat)`.
|
| 734 |
|
| 735 |
+
`string(what()).find(what_arg) != string::npos`.
|
| 736 |
|
| 737 |
``` cpp
|
| 738 |
system_error(int ev, const error_category& ecat);
|
| 739 |
```
|
| 740 |
|