-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NULLの定義としてnullptrが適合することを記載
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
そうだっけ?と思って C++03 の規定を確認すると以下のようになっていました。
4.10 [conv.ptr] p1
5.19 [expr.const] p1
これらによるとリテラル以外を含むこともできるので、
「
(void*)0
はリテラルではなく式であるため不正」という追加された理由付けは正しくないということになりそうです。
(
nullptr_t
以外のヌルポインタ定数がリテラルに限定されたのはC++14 cplusplus/draft@878a6dc でした。)
正確になるように文量を増やすことも考えられますが、ログで挙げられた目的
「nullptrが適合することを記載」だけなら詳細な定義に触れる必要は無さそう
なので削る方向のほうが簡単でいいかなと思いました。
検討ください。