mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-16 20:27:08 +03:00
book: typo fixes (#177)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
```
|
||||
|
||||
## 总结
|
||||
|
||||
Reference in New Issue
Block a user