C++ template template function

C++ examples for template:template function

Description

Click the following links for the tutorial for template and template function.

  1. Create a template max() function that returns the greater of two types
  2. Separating a Template from Function Code
  3. Using Different Types for a Template Parameter
  4. Using Static Members in a Template
  5. Overloading a Function Template Provides Even Greater Flexibility
  6. Defining a Series of Function Templates
  7. Creating a Template from a Structure
  8. Template Specialization for converting any type to string


  9. Creating a Static Library
  10. How to pass Template objects.
  11. What Are Templates?
  12. Partially Specializing a Template
  13. Explicit vs. Implicit Template Specialization
  14. Creating a Template Function
  15. Add + and << operators to a class to work with template function
  16. Writing Your Own Algorithm


  17. A more generic function to compute the mean
  18. Computing Variance, Standard Deviation, and Other Statistical Functions
  19. Compute dot product on two containers of numbers with the same length
  20. Computing the distance between vectors using inner_product
  21. Computing the Distance Between Two Vectors
  22. Computing the Norm of a Vector
  23. Compute the Discrete Fourier Transform (DFT) efficiently using the Fast Fourier Transform (FFT) algorithm.
  24. Initializing a Sequence with Comma-Separated Values
  25. Definition of generic function type maximum
  26. Using int, char and float to test maximum template function
  27. Using int, char and float to test minimum template function
  28. Using function-template specializations
  29. Create function template to test template class
  30. Selection Sort Function Template
  31. Create function template to compare two arguments of the same type with the equality operator ==
  32. Overload function template with a nontemplate version
  33. Create function template to print a range of array element
  34. A plus() function template.
  35. Using a function template
  36. Template used for function that finds number in array
  37. Template used for absolute value function
  38. Template used for function that averages array
  39. Create function template with parameter
  40. Create a generic function template