Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jimdempseyatthecove
Black Belt
81 Views

template built functions

This is a nagging post.

Back in the 1990's, when a template would construct function based on the type and number of arguments. And when the same template would construct function based on the type and number of arguments in multiple source files, the Linker would note the function signature and .obj contents, and when the signature and contents matched would ignore the additional instantiations of that function. Only if the contents differed would an objection be raised.

Today, one must declare the functions with "static inline" which results in substantial code bloat. Omitting "static inline" results in duplicate symbol.

Can someone explain why the old way was abandoned?

Jim Dempsey

0 Kudos
0 Replies
Reply