mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
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.
This commit is contained in:
@@ -19645,7 +19645,7 @@ String summary:
|
|||||||
Note how `>>` and `!=` are provided for `string` (as examples of useful operations) and there are no explicit
|
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).
|
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<string> read_until(string_view terminator) // C++17
|
vector<string> read_until(string_view terminator) // C++17
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user