As the 'inline' designation is merely a hint for a compiler, an inline function might likely actually end up being compiled on its own, in which case, the linkage specifiers become significant. Therefore, one has to be prepared for such eventuality: you can either declare the function 'static' and have it be compiled in each translation unit separately, or redeclare it with 'extern' in one translation unit. Another option is to inline it forcefully with always_inline attribute. Either way, it has to be dealt with.
Note: the inline keyword behaves differently in C++ than in C99/C11.
As the 'inline' designation is merely a hint for a compiler, an inline function might likely actually end up being compiled on its own, in which case, the linkage specifiers become significant. Therefore, one has to be prepared for such eventuality: you can either declare the function 'static' and have it be compiled in each translation unit separately, or redeclare it with 'extern' in one translation unit. Another option is to inline it forcefully with
always_inline
attribute. Either way, it has to be dealt with.Note: the
inline
keyword behaves differently in C++ than in C99/C11.Fixes #181, #185