It seems like when invoking a function explicitly, it should be compiled at compile-time with a specific variable type, but I am not sure how implicit function invokation works. I don`t think compiler will create a different function for evey datatype available (since there can be many different data-types in one program). So can someone explain how the templates work, and how they effect performance of the peogram¿ I understand that different compilers can implement them differently, so a link to a compiler-specific technical writting will suffice me.
Jump to Post
Template instantiation is done at compile-time; no there is no run-time overhead for instantiating a template.
> but I am not sure how implicit function invokation works.
> I don`t think compiler will create a different function for evey datatype available
> (since there can be many different data-types …
All 3 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.