From 07cbf4544e7011c6e57e6bac64917db7f20c0ba5 Mon Sep 17 00:00:00 2001 From: John Fultz Date: Thu, 24 Sep 2015 10:18:40 -0500 Subject: [PATCH] Fix usage of non_null in zstring clause. Also, fix a typo. --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 6b321e7..76a62d4 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -2092,9 +2092,9 @@ Functions are inconsistent in their use of `nullptr` and we must be more explici When I call `length(s)` should I test for `s==nullptr` first? Should the implementation of `length()` test for `p==nullptr`? - int length(zstring p); // it is the caller's job to make sure p!=nullptr + int length(zstring p); // the implementor of length() must assume that p==nullptr is possible - int length(not_null p); // the implementor of length() must assume that p==nullptr is possible + int length(not_null p); // it is the caller's job to make sure p!=nullptr **Note**: `zstring` do not represent ownership.