From Jason Turner

[bad.alloc]

Diff to HTML by rtfpessoa

tmp/tmp7oo4wmsv/{from.md → to.md} RENAMED
@@ -5,11 +5,11 @@ namespace std {
5
  class bad_alloc : public exception {
6
  public:
7
  bad_alloc() noexcept;
8
  bad_alloc(const bad_alloc&) noexcept;
9
  bad_alloc& operator=(const bad_alloc&) noexcept;
10
- virtual const char* what() const noexcept;
11
  };
12
  }
13
  ```
14
 
15
  The class `bad_alloc` defines the type of objects thrown as exceptions
@@ -19,21 +19,22 @@ by the implementation to report a failure to allocate storage.
19
  bad_alloc() noexcept;
20
  ```
21
 
22
  *Effects:* Constructs an object of class `bad_alloc`.
23
 
24
- *Remarks:* The result of calling `what()` on the newly constructed
25
- object is implementation-defined.
26
-
27
  ``` cpp
28
  bad_alloc(const bad_alloc&) noexcept;
29
  bad_alloc& operator=(const bad_alloc&) noexcept;
30
  ```
31
 
32
  *Effects:* Copies an object of class `bad_alloc`.
33
 
34
  ``` cpp
35
- virtual const char* what() const noexcept;
36
  ```
37
 
38
  *Returns:* An *implementation-defined* NTBS.
39
 
 
 
 
 
 
5
  class bad_alloc : public exception {
6
  public:
7
  bad_alloc() noexcept;
8
  bad_alloc(const bad_alloc&) noexcept;
9
  bad_alloc& operator=(const bad_alloc&) noexcept;
10
+ const char* what() const noexcept override;
11
  };
12
  }
13
  ```
14
 
15
  The class `bad_alloc` defines the type of objects thrown as exceptions
 
19
  bad_alloc() noexcept;
20
  ```
21
 
22
  *Effects:* Constructs an object of class `bad_alloc`.
23
 
 
 
 
24
  ``` cpp
25
  bad_alloc(const bad_alloc&) noexcept;
26
  bad_alloc& operator=(const bad_alloc&) noexcept;
27
  ```
28
 
29
  *Effects:* Copies an object of class `bad_alloc`.
30
 
31
  ``` cpp
32
+ const char* what() const noexcept override;
33
  ```
34
 
35
  *Returns:* An *implementation-defined* NTBS.
36
 
37
+ *Remarks:* The message may be a null-terminated multibyte
38
+ string ([[multibyte.strings]]), suitable for conversion and display as
39
+ a `wstring` ([[string.classes]], [[locale.codecvt]]).
40
+