MCPcopy Create free account
hub / github.com/changkun/modern-cpp-tutorial / add2

Function add2

code/2/2.3.cpp:20–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18// 尾返回类型
19template <typename T, typename U>
20auto add2(T x, U y) -> decltype(x+y) {
21 return x+y;
22}
23
24// C++14 返回类型推导
25template <typename T, typename U>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected