mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-17 04:34:40 +03:00
book: typo fixes (#177)
This commit is contained in:
@@ -292,7 +292,7 @@ This will iterate over the tuple:
|
|||||||
```cpp
|
```cpp
|
||||||
for(int i = 0; i != tuple_len(new_tuple); ++i)
|
for(int i = 0; i != tuple_len(new_tuple); ++i)
|
||||||
// runtime indexing
|
// runtime indexing
|
||||||
std::cout << tuple_index(i, new_tuple) << std::endl;
|
std::cout << tuple_index(new_tuple, i) << std::endl;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Conclusion
|
## Conclusion
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ auto tuple_len(T &tpl) {
|
|||||||
// 迭代
|
// 迭代
|
||||||
for(int i = 0; i != tuple_len(new_tuple); ++i)
|
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