Skip to content
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

Inconsistent null values throughout the draft #52

Closed
sdutoit opened this issue Apr 15, 2013 · 4 comments
Closed

Inconsistent null values throughout the draft #52

sdutoit opened this issue Apr 15, 2013 · 4 comments
Assignees
Labels
big An issue causing a large set of changes, scattered across most of the text.

Comments

@sdutoit
Copy link
Contributor

sdutoit commented Apr 15, 2013

From an email to cxxeditor@ (and pointed out by various people in the past):

I noticed following inconsistent usage of null and NULL in the current C++ standard (checked against N3337)

20.7.2.2.1/16 Uses NULL when i think it should be null to be consistent.
20.8.11.2.1/8 Same issue.

20.8.11.2.1/15 & 22 Uses NULL to compare where in other places in the std 0 and nullptr are used.

For example
20.7.1.2.5 compares against nullptr
20.7.2.2.1/22 compares against 0 (there are many more such)

There are many other NULL uses in the standard that are not clear that they should be NULL.

@sdutoit
Copy link
Contributor Author

sdutoit commented Apr 15, 2013

Jonathan also pointed out:

More generally, there are several places in the library that refer to
"NULL" or "non-NULL" that should be changed to lowercase null because
"null pointer value" is a term of art and with nullptr we should set a
good example and shun the NULL macro.

Some uses are not as trivial as doing a tolower substitution though,
should we consistently say "null pointer value" instead of "null
pointer", "null value" or just "null"?

Should std::function's constructor refer to a "null member pointer
value" as defined in 4.11 [conv.mem], instead of the current "NULL
pointer to member"?

@sdutoit
Copy link
Contributor Author

sdutoit commented Apr 15, 2013

@zygoloid
Copy link
Member

NULL in examples should be nullptr.
In preconditions and the like, say "p shall not be a null pointer value".

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 5, 2015

Does that fix this issue? Can it be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
big An issue causing a large set of changes, scattered across most of the text.
Projects
None yet
Development

No branches or pull requests

4 participants