[dcl.fct.def.replace] (original) (raw)

9 Declarations [dcl]

9.6 Function definitions [dcl.fct.def]

9.6.5 Replaceable function definitions [dcl.fct.def.replace]

Certain functions for which a definition is supplied by the implementation are replaceable.

A C++ program may provide a definition with the signature of a replaceable function, called a replacement function.

The replacement function is used instead of the default version supplied by the implementation.

A declaration of the replacement function

no diagnostic is required.

[Note 1:

The one-definition rule ([basic.def.odr])) applies to the definitions of a replaceable function provided by the program.

The implementation-supplied function definition is an otherwise-unnamed function with no linkage.

— _end note_]