book: typo fixes (#177)

This commit is contained in:
LaChimere
2021-04-06 05:30:43 +08:00
committed by GitHub
parent a386449dec
commit 4cb055f629
2 changed files with 2 additions and 2 deletions

View File

@@ -292,7 +292,7 @@ This will iterate over the tuple:
```cpp
for(int i = 0; i != tuple_len(new_tuple); ++i)
// runtime indexing
std::cout << tuple_index(i, new_tuple) << std::endl;
std::cout << tuple_index(new_tuple, i) << std::endl;
```
## Conclusion

View File

@@ -292,7 +292,7 @@ auto tuple_len(T &tpl) {
// 迭代
for(int i = 0; i != tuple_len(new_tuple); ++i)
// 运行期索引
std::cout << tuple_index(i, new_tuple) << std::endl;
std::cout << tuple_index(new_tuple, i) << std::endl;
```
## 总结