Function Templates vs Regular Functions Quiz
Question
Why are there 3 fooNonTemplate
functions and no fooTemplate
in the executable?
Because the | The compiler only instantiates those templates that are actually used. It creates as many instances as there different argument types with a template function is called. | |
Because the compiler instantiates all non-template functions, but only the used template functions | Correct! |
You have successfully completed this question!