S
Steven C.
When you compile a cpp program that includes a template class in a .h file
where does the compiled code go for that templated class? If it went in the
obj for the cpp program seems to me you could end up with multiple templates
of the same type if the .h file was included in multiple .cpp. Seems more
straight forward that it would be put in a obj for the .h and the compiler
would just add new ones to the obj for template types that had not been
created by other cpp.
Or if it was included in every cpp obj then I guess it would have a flag in
the obj for to ignore duplicates of the same template type.
Just curious how it worked.
where does the compiled code go for that templated class? If it went in the
obj for the cpp program seems to me you could end up with multiple templates
of the same type if the .h file was included in multiple .cpp. Seems more
straight forward that it would be put in a obj for the .h and the compiler
would just add new ones to the obj for template types that had not been
created by other cpp.
Or if it was included in every cpp obj then I guess it would have a flag in
the obj for to ignore duplicates of the same template type.
Just curious how it worked.