From Jason Turner

[basic.stc.dynamic.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpdnp7d3cs/{from.md → to.md} +7 -11
tmp/tmpdnp7d3cs/{from.md → to.md} RENAMED
@@ -12,29 +12,25 @@ global *deallocation functions* `operator delete` and
12
  [[new.delete.placement]] do not perform allocation or
13
  deallocation. — *end note*]
14
 
15
  The library provides default definitions for the global allocation and
16
  deallocation functions. Some global allocation and deallocation
17
- functions are replaceable [[new.delete]]; these are attached to the
18
- global module [[module.unit]]. A C++ program shall provide at most one
19
- definition of a replaceable allocation or deallocation function. Any
20
- such function definition replaces the default version provided in the
21
- library [[replacement.functions]]. The following allocation and
22
- deallocation functions [[support.dynamic]] are implicitly declared in
23
- global scope in each translation unit of a program.
24
 
25
  ``` cpp
26
- [[nodiscard]] void* operator new(std::size_t);
27
- [[nodiscard]] void* operator new(std::size_t, std::align_val_t);
28
 
29
  void operator delete(void*) noexcept;
30
  void operator delete(void*, std::size_t) noexcept;
31
  void operator delete(void*, std::align_val_t) noexcept;
32
  void operator delete(void*, std::size_t, std::align_val_t) noexcept;
33
 
34
- [[nodiscard]] void* operator new[](std::size_t);
35
- [[nodiscard]] void* operator new[](std::size_t, std::align_val_t);
36
 
37
  void operator delete[](void*) noexcept;
38
  void operator delete[](void*, std::size_t) noexcept;
39
  void operator delete[](void*, std::align_val_t) noexcept;
40
  void operator delete[](void*, std::size_t, std::align_val_t) noexcept;
 
12
  [[new.delete.placement]] do not perform allocation or
13
  deallocation. — *end note*]
14
 
15
  The library provides default definitions for the global allocation and
16
  deallocation functions. Some global allocation and deallocation
17
+ functions are replaceable [[term.replaceable.function]]. The following
18
+ allocation and deallocation functions [[support.dynamic]] are implicitly
19
+ declared in global scope in each translation unit of a program.
 
 
 
 
20
 
21
  ``` cpp
22
+ void* operator new(std::size_t);
23
+ void* operator new(std::size_t, std::align_val_t);
24
 
25
  void operator delete(void*) noexcept;
26
  void operator delete(void*, std::size_t) noexcept;
27
  void operator delete(void*, std::align_val_t) noexcept;
28
  void operator delete(void*, std::size_t, std::align_val_t) noexcept;
29
 
30
+ void* operator new[](std::size_t);
31
+ void* operator new[](std::size_t, std::align_val_t);
32
 
33
  void operator delete[](void*) noexcept;
34
  void operator delete[](void*, std::size_t) noexcept;
35
  void operator delete[](void*, std::align_val_t) noexcept;
36
  void operator delete[](void*, std::size_t, std::align_val_t) noexcept;