3 ms·
Quoting the C++ 17 standard draft [0]: > There can be more than one definition in a program of [...an] inline function [...] as long as all of the following is
by MauranKilom 5y ago
Quoting the C++ 17 standard draft [0]:
> There can be more than one definition in a program of [...an] inline function [...] as long as all of the following is true:
> - each definition consists of the same sequence of tokens (typically, appears in the same header file)
> [...]
> If all these requirements are satisfied, the program behaves as if there is only one definition in the entire program. Otherwise, the program is ill-formed, no diagnostic required.
[0]: https://timsong-cpp.github.io/cppwp/n4659/basic.def.odr#6.1 https://timsong-cpp.github.io/cppwp/n4659/basic.def.odr#6.1