Modern financial programming in C++ makes heavy use of template-based algorithms. Many of the basic algorithms related to trading options and their derivatives are implemented in terms of function and class templates. This is done due to the superior advantages of templates in terms of performance as well as their ability to improve code reuse.
Several template-based algorithms are implemented right into the standard template library (STL), which is one of the main parts of C++ standard ...