Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Note: usually we try to avoid "you" in the documentation.
Also, I don't know much about static_assert. We may need a src committer help here.
share/man/man3/assert.3 | ||
---|---|---|
102 | I'd add an example too. static_assert(sizeof(int) == sizeof(void *), "ints and pointers are different sizes"); |
share/man/man3/assert.3 | ||
---|---|---|
102 | Sure, I will update it shortly. Thanks. |
share/man/man3/assert.3 | ||
---|---|---|
102 | I just added an example, please let me know if I should add more or change anything. Thanks! |
share/man/man3/assert.3 | ||
---|---|---|
90–91 | Not sure if you also want to mention C++ here. This statement is only true for C, in C++11 static_assert is a keyword and _Static_assert. GCC rejects _Static_assert in C++ mode while clang accepts it. |
share/man/man3/assert.3 | ||
---|---|---|
90–91 | Completely true. _Static_assert does not exist in C++, and that's why using static_assert is mostly preferred. And this is indeed very good to educate the reader. But I think we predominantly discuss C topics, and since a lot of things differ in C++, I think this is not necessary to delve into such details. |