As a followup to the question Should I define static inline methods in header file?
If I have two helper functions in two separate cpp files have the same signature, the compiler will complain about ODR. Is it therefore good style to make free functions in a cpp file static
to avoid name clashes and give the linker less work?
More generally asked: What are advantages and disadvantages of making free functions inline
, static
or static inline
in a cpp file?