From d996c978094da48299d2e19c547d100162ed2ecc Mon Sep 17 00:00:00 2001 From: Hugh Macdonald Date: Tue, 14 Jul 2020 16:41:23 +0100 Subject: [PATCH] Fix typo in SL.str.1 (#1648) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of SL.str.1 references replacing “const string*” with “string_view”, but the example code above shows “const string&” instead. This changes the comment to the reference rather than pointer. --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 1b84dbd..ea91584 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -19645,7 +19645,7 @@ String summary: Note how `>>` and `!=` are provided for `string` (as examples of useful operations) and there are no explicit allocations, deallocations, or range checks (`string` takes care of those). -In C++17, we might use `string_view` as the argument, rather than `const string*` to allow more flexibility to callers: +In C++17, we might use `string_view` as the argument, rather than `const string&` to allow more flexibility to callers: vector read_until(string_view terminator) // C++17 {