mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-17 04:34:40 +03:00
fix: add missing semicolon in template function "add" (#18)
This commit is contained in:
@@ -616,7 +616,7 @@ int main() {
|
||||
```cpp
|
||||
template<typename T, typename U>
|
||||
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
|
||||
template<typename T = int, typename U = int>
|
||||
auto add(T x, U y) -> decltype(x+y) {
|
||||
return x+y
|
||||
return x+y;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user