Skip to content

Commit cf2bf66

Browse files
authored
Update 2.14.default.template.param.cpp
Simplified method signature according to modern standard
1 parent 8767bb8 commit cf2bf66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/2/2.14.default.template.param.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#include <iostream>
1111

1212
template<typename T = int, typename U = int>
13-
auto add(T x, U y) -> decltype(x+y) {
13+
auto add(T x, U y) {
1414
return x+y;
1515
}
1616

1717
int main() {
1818
std::cout << add(1, 2) << std::endl;
19-
}
19+
}

0 commit comments

Comments
 (0)