mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Correct spelling of nullptr
This commit is contained in:
parent
7b4a1903ec
commit
38772fc251
|
@ -17653,8 +17653,8 @@ A `span<T>` refers to zero or more mutable `T`s unless `T` is a `const` type.
|
|||
"Pointer arithmetic" is best done within `span`s.
|
||||
A `char*` that points to more than one `char` but is not a C-style string (e.g., a pointer into an input buffer) should be represented by a `span`.
|
||||
|
||||
* `zstring` // a `char*` supposed to be a C-style string; that is, a zero-terminated sequence of `char` or `null_ptr`
|
||||
* `czstring` // a `const char*` supposed to be a C-style string; that is, a zero-terminated sequence of `const` `char` or `null_ptr`
|
||||
* `zstring` // a `char*` supposed to be a C-style string; that is, a zero-terminated sequence of `char` or `nullptr`
|
||||
* `czstring` // a `const char*` supposed to be a C-style string; that is, a zero-terminated sequence of `const` `char` or `nullptr`
|
||||
|
||||
Logically, those last two aliases are not needed, but we are not always logical, and they make the distinction between a pointer to one `char` and a pointer to a C-style string explicit.
|
||||
A sequence of characters that is not assumed to be zero-terminated should be a `char*`, rather than a `zstring`.
|
||||
|
|
Loading…
Reference in New Issue
Block a user