1. ► Templates allow optimizations because of:
2. ► Templates can be used to provide compile time constraints
3. ► Constants allow compiler optimizations
4. ► C++ doesn’t allow type mismatches
5. ► A constant function cannot have side-effects
6. ► Templates are type-safe
7. ► ‘int *’ is same as ‘const int *’
8. ► Template types are checked at run-time
9. ► Templates are used for making a function or a class type agnostic
10. ► Template compilation is slow because of:
11. ► Using const is a good design practice to avoid the possibility of side-effects
12. ► dynamic_cast is used to find out the exact type of template class at run-time
13. ► A const value can be made to change via static_cast
14. ► Templates are mostly used for generic containers
15. ► ‘const int *’ is same as ‘int const *’
16. ► In ‘int * const’, interger value is a constant