MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / larger

Function larger

Exercises/Modules/Chapter 10/Soln10_02.cpp:40–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38// Template for functions to return the larger of two values
39template <typename T>
40T larger(T a, T b)
41{
42 return a > b? a : b;
43}
44
45// Template specialization for returning the larger of two character arrays
46// (such as string literals).

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected