tmp/tmpug3jh7ij/{from.md → to.md}
RENAMED
|
@@ -505,11 +505,12 @@ have the same address. This means that applications using custom
|
|
| 505 |
|
| 506 |
``` cpp
|
| 507 |
namespace std {
|
| 508 |
class error_category {
|
| 509 |
public:
|
| 510 |
-
|
|
|
|
| 511 |
error_category(const error_category&) = delete;
|
| 512 |
error_category& operator=(const error_category&) = delete;
|
| 513 |
virtual const char* name() const noexcept = 0;
|
| 514 |
virtual error_condition default_error_condition(int ev) const noexcept;
|
| 515 |
virtual bool equivalent(int code, const error_condition& condition) const noexcept;
|
|
@@ -527,10 +528,16 @@ namespace std {
|
|
| 527 |
} // namespace std
|
| 528 |
```
|
| 529 |
|
| 530 |
#### Class `error_category` virtual members <a id="syserr.errcat.virtuals">[[syserr.errcat.virtuals]]</a>
|
| 531 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 532 |
``` cpp
|
| 533 |
virtual const char* name() const noexcept = 0;
|
| 534 |
```
|
| 535 |
|
| 536 |
*Returns:* A string naming the error category.
|
|
@@ -559,10 +566,16 @@ virtual string message(int ev) const = 0;
|
|
| 559 |
|
| 560 |
*Returns:* A string that describes the error condition denoted by `ev`.
|
| 561 |
|
| 562 |
#### Class `error_category` non-virtual members <a id="syserr.errcat.nonvirtuals">[[syserr.errcat.nonvirtuals]]</a>
|
| 563 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 564 |
``` cpp
|
| 565 |
bool operator==(const error_category& rhs) const noexcept;
|
| 566 |
```
|
| 567 |
|
| 568 |
*Returns:* `this == &rhs`.
|
|
@@ -987,12 +1000,12 @@ bool operator!=(const error_condition& lhs, const error_condition& rhs) noexcept
|
|
| 987 |
|
| 988 |
``` cpp
|
| 989 |
template <> struct hash<error_code>;
|
| 990 |
```
|
| 991 |
|
| 992 |
-
|
| 993 |
-
|
| 994 |
|
| 995 |
### Class `system_error` <a id="syserr.syserr">[[syserr.syserr]]</a>
|
| 996 |
|
| 997 |
#### Class `system_error` overview <a id="syserr.syserr.overview">[[syserr.syserr.overview]]</a>
|
| 998 |
|
|
@@ -1031,11 +1044,11 @@ system_error(error_code ec, const string& what_arg);
|
|
| 1031 |
|
| 1032 |
*Effects:* Constructs an object of class `system_error`.
|
| 1033 |
|
| 1034 |
*Postconditions:* `code() == ec`.
|
| 1035 |
|
| 1036 |
-
string(what()).find(what_arg) != string::npos.
|
| 1037 |
|
| 1038 |
``` cpp
|
| 1039 |
system_error(error_code ec, const char* what_arg);
|
| 1040 |
```
|
| 1041 |
|
|
@@ -1071,11 +1084,11 @@ system_error(int ev, const error_category& ecat,
|
|
| 1071 |
|
| 1072 |
*Effects:* Constructs an object of class `system_error`.
|
| 1073 |
|
| 1074 |
*Postconditions:* `code() == error_code(ev, ecat)`.
|
| 1075 |
|
| 1076 |
-
string(what()).find(what_arg) != string::npos.
|
| 1077 |
|
| 1078 |
``` cpp
|
| 1079 |
system_error(int ev, const error_category& ecat);
|
| 1080 |
```
|
| 1081 |
|
|
|
|
| 505 |
|
| 506 |
``` cpp
|
| 507 |
namespace std {
|
| 508 |
class error_category {
|
| 509 |
public:
|
| 510 |
+
constexpr error_category() noexcept;
|
| 511 |
+
virtual ~error_category();
|
| 512 |
error_category(const error_category&) = delete;
|
| 513 |
error_category& operator=(const error_category&) = delete;
|
| 514 |
virtual const char* name() const noexcept = 0;
|
| 515 |
virtual error_condition default_error_condition(int ev) const noexcept;
|
| 516 |
virtual bool equivalent(int code, const error_condition& condition) const noexcept;
|
|
|
|
| 528 |
} // namespace std
|
| 529 |
```
|
| 530 |
|
| 531 |
#### Class `error_category` virtual members <a id="syserr.errcat.virtuals">[[syserr.errcat.virtuals]]</a>
|
| 532 |
|
| 533 |
+
``` cpp
|
| 534 |
+
virtual ~error_category();
|
| 535 |
+
```
|
| 536 |
+
|
| 537 |
+
*Effects:* Destroys an object of class `error_category`.
|
| 538 |
+
|
| 539 |
``` cpp
|
| 540 |
virtual const char* name() const noexcept = 0;
|
| 541 |
```
|
| 542 |
|
| 543 |
*Returns:* A string naming the error category.
|
|
|
|
| 566 |
|
| 567 |
*Returns:* A string that describes the error condition denoted by `ev`.
|
| 568 |
|
| 569 |
#### Class `error_category` non-virtual members <a id="syserr.errcat.nonvirtuals">[[syserr.errcat.nonvirtuals]]</a>
|
| 570 |
|
| 571 |
+
``` cpp
|
| 572 |
+
constexpr error_category() noexcept;
|
| 573 |
+
```
|
| 574 |
+
|
| 575 |
+
*Effects:* Constructs an object of class `error_category`.
|
| 576 |
+
|
| 577 |
``` cpp
|
| 578 |
bool operator==(const error_category& rhs) const noexcept;
|
| 579 |
```
|
| 580 |
|
| 581 |
*Returns:* `this == &rhs`.
|
|
|
|
| 1000 |
|
| 1001 |
``` cpp
|
| 1002 |
template <> struct hash<error_code>;
|
| 1003 |
```
|
| 1004 |
|
| 1005 |
+
The template specialization shall meet the requirements of class
|
| 1006 |
+
template `hash` ([[unord.hash]]).
|
| 1007 |
|
| 1008 |
### Class `system_error` <a id="syserr.syserr">[[syserr.syserr]]</a>
|
| 1009 |
|
| 1010 |
#### Class `system_error` overview <a id="syserr.syserr.overview">[[syserr.syserr.overview]]</a>
|
| 1011 |
|
|
|
|
| 1044 |
|
| 1045 |
*Effects:* Constructs an object of class `system_error`.
|
| 1046 |
|
| 1047 |
*Postconditions:* `code() == ec`.
|
| 1048 |
|
| 1049 |
+
`string(what()).find(what_arg) != string::npos`.
|
| 1050 |
|
| 1051 |
``` cpp
|
| 1052 |
system_error(error_code ec, const char* what_arg);
|
| 1053 |
```
|
| 1054 |
|
|
|
|
| 1084 |
|
| 1085 |
*Effects:* Constructs an object of class `system_error`.
|
| 1086 |
|
| 1087 |
*Postconditions:* `code() == error_code(ev, ecat)`.
|
| 1088 |
|
| 1089 |
+
`string(what()).find(what_arg) != string::npos`.
|
| 1090 |
|
| 1091 |
``` cpp
|
| 1092 |
system_error(int ev, const error_category& ecat);
|
| 1093 |
```
|
| 1094 |
|