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

Function larger

Examples/Modules/Chapter 10/Ex10_03A.cpp:9–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7// Supports implicit converion of differently-typed arguments
8template <typename T1, typename T2>
9decltype(auto) larger(const T1& a, const T2& b)
10{
11 return a > b ? a : b;
12}
13
14int main()
15{

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected