A simple strategy: every time such an inline
function is defined, compile it for the object time, as if it were a normal function. Then, during the connection, detect duplicate functions and delete them, leaving one copy of each. This is how C ++ compilers worked (also in the face of templates) about 10 years ago. Not sure how they do it these days.
source share