From Jason Turner

[basic.stc.dynamic.allocation]

Diff to HTML by rtfpessoa

tmp/tmp9bcllxye/{from.md → to.md} RENAMED
@@ -27,29 +27,29 @@ storage allocated (until the storage is explicitly deallocated by a call
27
  to a corresponding deallocation function). Even if the size of the space
28
  requested is zero, the request can fail. If the request succeeds, the
29
  value returned shall be a non-null pointer value ([[conv.ptr]]) `p0`
30
  different from any previously returned value `p1`, unless that value
31
  `p1` was subsequently passed to an `operator` `delete`. The effect of
32
- dereferencing a pointer returned as a request for zero size is
33
- undefined.[^11]
34
 
35
  An allocation function that fails to allocate storage can invoke the
36
  currently installed new-handler function ([[new.handler]]), if any. A
37
  program-supplied allocation function can obtain the address of the
38
  currently installed `new_handler` using the `std::get_new_handler`
39
  function ([[set.new.handler]]). If an allocation function declared with
40
  a non-throwing *exception-specification* ([[except.spec]]) fails to
41
  allocate storage, it shall return a null pointer. Any other allocation
42
  function that fails to allocate storage shall indicate failure only by
43
- throwing an exception of a type that would match a handler (
44
- [[except.handle]]) of type `std::bad_alloc` ([[bad.alloc]]).
45
 
46
  A global allocation function is only called as the result of a new
47
  expression ([[expr.new]]), or called directly using the function call
48
  syntax ([[expr.call]]), or called indirectly through calls to the
49
  functions in the C++standard library. In particular, a global allocation
50
  function is not called to allocate storage for objects with static
51
  storage duration ([[basic.stc.static]]), for objects or references with
52
  thread storage duration ([[basic.stc.thread]]), for objects of type
53
- `std::type_info` ([[expr.typeid]]), or for the copy of an object thrown
54
- by a `throw` expression ([[except.throw]]).
55
 
 
27
  to a corresponding deallocation function). Even if the size of the space
28
  requested is zero, the request can fail. If the request succeeds, the
29
  value returned shall be a non-null pointer value ([[conv.ptr]]) `p0`
30
  different from any previously returned value `p1`, unless that value
31
  `p1` was subsequently passed to an `operator` `delete`. The effect of
32
+ indirecting through a pointer returned as a request for zero size is
33
+ undefined.[^12]
34
 
35
  An allocation function that fails to allocate storage can invoke the
36
  currently installed new-handler function ([[new.handler]]), if any. A
37
  program-supplied allocation function can obtain the address of the
38
  currently installed `new_handler` using the `std::get_new_handler`
39
  function ([[set.new.handler]]). If an allocation function declared with
40
  a non-throwing *exception-specification* ([[except.spec]]) fails to
41
  allocate storage, it shall return a null pointer. Any other allocation
42
  function that fails to allocate storage shall indicate failure only by
43
+ throwing an exception ([[except.throw]]) of a type that would match a
44
+ handler ([[except.handle]]) of type `std::bad_alloc` ([[bad.alloc]]).
45
 
46
  A global allocation function is only called as the result of a new
47
  expression ([[expr.new]]), or called directly using the function call
48
  syntax ([[expr.call]]), or called indirectly through calls to the
49
  functions in the C++standard library. In particular, a global allocation
50
  function is not called to allocate storage for objects with static
51
  storage duration ([[basic.stc.static]]), for objects or references with
52
  thread storage duration ([[basic.stc.thread]]), for objects of type
53
+ `std::type_info` ([[expr.typeid]]), or for an exception object (
54
+ [[except.throw]]).
55