Skip to content

Make the code more easier to understand #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions book/en-us/02-usability.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,10 @@ auto arr = new auto(10); // arr as int *
> In addition, `auto` cannot be used to derive array types:
>
> ```cpp
> auto auto_arr2[10] = arr; // illegal, can't infer array type
> auto auto_arr2[10] = {arr}; // illegal, can't infer array type
>
> 2.6.auto.cpp:30:19: error: 'auto_arr2' declared as array of 'auto'
> auto auto_arr2[10] = arr;
> auto auto_arr2[10] = {arr};
> ```

### decltype
Expand Down
4 changes: 2 additions & 2 deletions book/zh-cn/02-usability.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,10 @@ auto arr = new auto(10); // arr 被推导为 int *
> 此外,`auto` 还不能用于推导数组类型:
>
> ```cpp
> auto auto_arr2[10] = arr; // 错误, 无法推导数组元素类型
> auto auto_arr2[10] = {arr}; // 错误, 无法推导数组元素类型
>
> 2.6.auto.cpp:30:19: error: 'auto_arr2' declared as array of 'auto'
> auto auto_arr2[10] = arr;
> auto auto_arr2[10] = {arr};
> ```

### decltype
Expand Down