Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
max1.cpp
Go to the documentation of this file.
1 
7 #include "max1.hpp"
8 #include <iostream>
9 
10 int main()
11 {
12  const int i = 42;
13  std::cout << max<int>(7, i) << std::endl;
14 
15  const double f1 = 3.4;
16  const double f2 = -6.7;
17  std::cout << max<double>(f1, f2) << std::endl;
18 
19  const std::string s1 = "mathematics";
20  const std::string s2 = "math";
21  std::cout << ::max(s1, s2) << std::endl;
22 
23  return 0;
24 }
int main()
Definition: max1.cpp:10
T const & max(T const &a, T const &b)
Definition: max1.hpp:9
Template function returns maximum.