Skip to content

Commit d996c97

Browse files
Fix typo in SL.str.1 (#1648)
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.
1 parent 12f29f2 commit d996c97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CppCoreGuidelines.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19645,7 +19645,7 @@ String summary:
1964519645
Note how `>>` and `!=` are provided for `string` (as examples of useful operations) and there are no explicit
1964619646
allocations, deallocations, or range checks (`string` takes care of those).
1964719647

19648-
In C++17, we might use `string_view` as the argument, rather than `const string*` to allow more flexibility to callers:
19648+
In C++17, we might use `string_view` as the argument, rather than `const string&` to allow more flexibility to callers:
1964919649

1965019650
vector<string> read_until(string_view terminator) // C++17
1965119651
{

0 commit comments

Comments
 (0)