mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Applied the suggestion in PR #198.
This commit is contained in:
parent
10d1d9dbc5
commit
4b15a57f96
|
@ -2536,7 +2536,7 @@ A `not_null<T*>` is assumed not to be the `nullptr`; a `T*` may be the `nullptr`
|
|||
|
||||
##### Reason
|
||||
|
||||
Clarity. Making it clear that a test for null isn't needed.
|
||||
Clarity. A function with a `not_null<T>` parameter makes it clear that the caller of the function is responsible for any `nullptr` checks that may be necessary. Similarly, a function with a return value of `not_null<T>` makes it clear that the caller of the function does not need to check for `nullptr`.
|
||||
|
||||
##### Example
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user