fix: add missing semicolon in template function "add" (#18)

This commit is contained in:
HaoChen
2018-04-14 19:21:37 +08:00
committed by Ou Changkun
parent 7955c68880
commit 622b5b4335

View File

@@ -616,7 +616,7 @@ int main() {
```cpp ```cpp
template<typename T, typename U> template<typename T, typename U>
auto add(T x, U y) -> decltype(x+y) { auto add(T x, U y) -> decltype(x+y) {
return x+y return x+y;
} }
``` ```
@@ -627,7 +627,7 @@ auto add(T x, U y) -> decltype(x+y) {
```cpp ```cpp
template<typename T = int, typename U = int> template<typename T = int, typename U = int>
auto add(T x, U y) -> decltype(x+y) { auto add(T x, U y) -> decltype(x+y) {
return x+y return x+y;
} }
``` ```