Hacker News new | ask | show | jobs
by jcelerier 3050 days ago
> any executable code appearing in a header file might end up existing in multiple copies throughout the executable

that's why the keyword "inline" exists.

1 comments

'Inline' does not prevent duplication of the generated code (in fact, it forces it).
... mostly. Except in the case where the inlined version can be optimized away, which is the best time to use inline but not entirely germane.