Hi,


I need some help to understand how templates work. So templates allow functions (classes) to work with generic variable types. As far as I understood the decision how the function is ulitmatly defined (whether it should accept int or long int ) happens at compile time. (Right?) So if I compile my libraries contiainig templates beforehand and then use them for compiling my main program afterwords, what happens then? how are my functions defined (int or long int or are they still generic) and how does this work?

thnx

PS

is it a better practice to compile libraries in such cases or just make hpp files and compile them de novo each time , together with a main program?