tmp/tmp2w7tmhla/{from.md → to.md}
RENAMED
|
@@ -5,37 +5,34 @@ namespace std {
|
|
| 5 |
class bad_cast : public exception {
|
| 6 |
public:
|
| 7 |
bad_cast() noexcept;
|
| 8 |
bad_cast(const bad_cast&) noexcept;
|
| 9 |
bad_cast& operator=(const bad_cast&) noexcept;
|
| 10 |
-
|
| 11 |
};
|
| 12 |
}
|
| 13 |
```
|
| 14 |
|
| 15 |
The class `bad_cast` defines the type of objects thrown as exceptions by
|
| 16 |
-
the implementation to report the execution of an invalid
|
| 17 |
expression ([[expr.dynamic.cast]]).
|
| 18 |
|
| 19 |
``` cpp
|
| 20 |
bad_cast() noexcept;
|
| 21 |
```
|
| 22 |
|
| 23 |
*Effects:* Constructs an object of class `bad_cast`.
|
| 24 |
|
| 25 |
-
*Remarks:* The result of calling `what()` on the newly constructed
|
| 26 |
-
object is implementation-defined.
|
| 27 |
-
|
| 28 |
``` cpp
|
| 29 |
bad_cast(const bad_cast&) noexcept;
|
| 30 |
bad_cast& operator=(const bad_cast&) noexcept;
|
| 31 |
```
|
| 32 |
|
| 33 |
*Effects:* Copies an object of class `bad_cast`.
|
| 34 |
|
| 35 |
``` cpp
|
| 36 |
-
|
| 37 |
```
|
| 38 |
|
| 39 |
*Returns:* An *implementation-defined* NTBS.
|
| 40 |
|
| 41 |
*Remarks:* The message may be a null-terminated multibyte
|
|
|
|
| 5 |
class bad_cast : public exception {
|
| 6 |
public:
|
| 7 |
bad_cast() noexcept;
|
| 8 |
bad_cast(const bad_cast&) noexcept;
|
| 9 |
bad_cast& operator=(const bad_cast&) noexcept;
|
| 10 |
+
const char* what() const noexcept override;
|
| 11 |
};
|
| 12 |
}
|
| 13 |
```
|
| 14 |
|
| 15 |
The class `bad_cast` defines the type of objects thrown as exceptions by
|
| 16 |
+
the implementation to report the execution of an invalid `dynamic_cast`
|
| 17 |
expression ([[expr.dynamic.cast]]).
|
| 18 |
|
| 19 |
``` cpp
|
| 20 |
bad_cast() noexcept;
|
| 21 |
```
|
| 22 |
|
| 23 |
*Effects:* Constructs an object of class `bad_cast`.
|
| 24 |
|
|
|
|
|
|
|
|
|
|
| 25 |
``` cpp
|
| 26 |
bad_cast(const bad_cast&) noexcept;
|
| 27 |
bad_cast& operator=(const bad_cast&) noexcept;
|
| 28 |
```
|
| 29 |
|
| 30 |
*Effects:* Copies an object of class `bad_cast`.
|
| 31 |
|
| 32 |
``` cpp
|
| 33 |
+
const char* what() const noexcept override;
|
| 34 |
```
|
| 35 |
|
| 36 |
*Returns:* An *implementation-defined* NTBS.
|
| 37 |
|
| 38 |
*Remarks:* The message may be a null-terminated multibyte
|