From Jason Turner

[dcl.fct.def.replace]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpt6vby541/{from.md → to.md} +25 -0
tmp/tmpt6vby541/{from.md → to.md} RENAMED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Replaceable function definitions <a id="dcl.fct.def.replace">[[dcl.fct.def.replace]]</a>
2
+
3
+ Certain functions for which a definition is supplied by the
4
+ implementation are *replaceable*. A C++ program may provide a definition
5
+ with the signature of a replaceable function, called a
6
+ *replacement function*. The replacement function is used instead of the
7
+ default version supplied by the implementation. Such replacement occurs
8
+ prior to program startup [[basic.def.odr]], [[basic.start]]. A
9
+ declaration of the replacement function
10
+
11
+ - shall not be inline,
12
+ - shall be attached to the global module,
13
+ - shall have C++ language linkage,
14
+ - shall have the same return type as the replaceable function, and
15
+ - if the function is declared in a standard library header, shall be
16
+ such that it would be valid as a redeclaration of the declaration in
17
+ that header;
18
+
19
+ no diagnostic is required.
20
+
21
+ [*Note 1*: The one-definition rule [[basic.def.odr]] applies to the
22
+ definitions of a replaceable function provided by the program. The
23
+ implementation-supplied function definition is an otherwise-unnamed
24
+ function with no linkage. — *end note*]
25
+