From 5ffabce718659bc269447d8bed9e5d46d769e746 Mon Sep 17 00:00:00 2001 From: Will Wray Date: Mon, 3 Jul 2017 12:13:40 -0400 Subject: [PATCH] Fix Inconsistent definition of czstring in comments Comments in sections SL.str.3 and GSL.view disagree on whether czstring may be the nullptr. This PR fixes the first comment definition in SL.str.3 that czstring `is a C-style string that is not the nullptr` ### SL.str.3: Use zstring or czstring to refer to a C-style, zero-terminated, sequence of characters ``` void f1(zstring s); // s is a C-style string or the nullptr void f1(czstring s); // s is a C-style string that is not the nullptr ``` ### GSL.view: Views `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` --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 8172464..8b7017b 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -18755,7 +18755,7 @@ Distinguishing these alternatives prevents misunderstandings and bugs. All we know is that it is supposed to be the nullptr or point to at least one character void f1(zstring s); // s is a C-style string or the nullptr - void f1(czstring s); // s is a C-style string that is not the nullptr + void f1(czstring s); // s is a C-style string constant or the nullptr void f1(std::byte* s); // s is a pointer to a byte (C++17) ##### Note