Is there any purpose for sending parameters through templates? If so, how does this differ from sending parameters via the internal stack? Example:
void myMethod(int argument){
against
template<int argument>
void myMethod(){
In the book Thinking in C ++ , volume 1, 2nd edition, in the section "Templates in depth", there are only a few words about the template arguments that are different from the type, and I feel that I did not fully understand their purpose.
EDIT: Thanks for the explanation. If I could, I would mark both answers as they both complemented each other.
source
share