C
collection60
Hi people,
I want to use templates, for syntatic niceness only, not for doing
similar operations on different types. The types I'm manipulating are
basically just pointers. So if it's a pointer to a Fred or a pointer to
a long, it makes no difference.
So, I want the exact same code, to be running on different types. So
even if I used this template on 1000 different types, I'd want only one
copy of that code in my executable, I do not want the size of my
executable to go up with the number of types used by this template.
Is that how it works? Can I get syntactic niceness without getting code
bloat?
I want to use templates, for syntatic niceness only, not for doing
similar operations on different types. The types I'm manipulating are
basically just pointers. So if it's a pointer to a Fred or a pointer to
a long, it makes no difference.
So, I want the exact same code, to be running on different types. So
even if I used this template on 1000 different types, I'd want only one
copy of that code in my executable, I do not want the size of my
executable to go up with the number of types used by this template.
Is that how it works? Can I get syntactic niceness without getting code
bloat?