Skip to content

Commit 4cb055f

Browse files
authored
book: typo fixes (changkun#177)
1 parent a386449 commit 4cb055f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

book/en-us/04-containers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ This will iterate over the tuple:
292292
```cpp
293293
for(int i = 0; i != tuple_len(new_tuple); ++i)
294294
// runtime indexing
295-
std::cout << tuple_index(i, new_tuple) << std::endl;
295+
std::cout << tuple_index(new_tuple, i) << std::endl;
296296
```
297297

298298
## Conclusion

book/zh-cn/04-containers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ auto tuple_len(T &tpl) {
292292
// 迭代
293293
for(int i = 0; i != tuple_len(new_tuple); ++i)
294294
// 运行期索引
295-
std::cout << tuple_index(i, new_tuple) << std::endl;
295+
std::cout << tuple_index(new_tuple, i) << std::endl;
296296
```
297297

298298
## 总结

0 commit comments

Comments
 (0)