Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #28 from Ultcrt/cms/posts/2023-10-08-c-开发时遇到的一些难以排…
Browse files Browse the repository at this point in the history
…查的错误

Automatically generated. Merged on Decap CMS.
  • Loading branch information
Ultcrt authored Dec 28, 2023
2 parents b64b777 + 69a0547 commit ecbd666
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,7 @@ int foo() {
else return N + foo<N-1>();
}
```
需要注意,`else` 在这里不能省略,因为 `if constexpr` 只能对于 `if``else` 两个分支进行判断,外部代码无法判断是否被抛弃。
需要注意,`else` 在这里不能省略,因为 `if constexpr` 只能对于 `if``else` 两个分支进行判断,外部代码无法判断是否被抛弃。

## 单个参数包用作构造函数唯一参数时可能导致的问题
在使用参数包(parameter pack)作为构造函数的唯一参数时,默认拷贝构造函数在输入非const时会被其覆盖,可能导致一些难以排查的问题。

0 comments on commit ecbd666

Please sign in to comment.