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

Function larger

Examples/Modules/Chapter 10/Ex10_02.cpp:29–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27// Template for functions to return the larger of two values
28template <typename T>
29T larger(T a, T b)
30{
31 return a > b ? a : b;
32}
33
34template<typename T>
35T* larger(T* a, T* b)

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected