Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
8
template <typename T1, typename T2>
9
decltype(auto) larger(const T1& a, const T2& b)
10
{
11
return a > b ? a : b;
12
}
13
14
int main()
15
{
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected