Question: Suppose you've written a large C++ program that makes heavy use of templates, and that those templates are all written in header files. What effect

Suppose you've written a large C++ program that makes heavy use of templates, and that those templates are all written in header files. What effect would you expect this tendency to have on how long it takes to compile this large program, relative to an equivalent program that made no use of templates? Why?
We've discussed why it's so often the case that we write C++ templates in header files rather than source files. Let's explore a couple of aspects of that tendency, by answering two questions about it. Declaring function templates separately from writing their bodies Suppose you've decided to write a function template that you expect to use in many different source files. Suppose, further, that you haven't followed the basic advice of writing C++ templates in header files, but have instead done the following: Written only a declaration of the function template in a header file x.hpp (i.e., all you wrote in the header file is template
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
