Skip to content

Commit

Permalink
string_view: Correct string_view(const char*, size_type) docs
Browse files Browse the repository at this point in the history
This constructor has two arguments, so it is not "implicit" as was previously
stated.

PiperOrigin-RevId: 705084217
Change-Id: Ia94a2fc50c1946d45af26810b5728aa03e786746
  • Loading branch information
Abseil Team authored and copybara-github committed Dec 11, 2024
1 parent 28528f5 commit 7bc6543
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion absl/strings/string_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class ABSL_ATTRIBUTE_VIEW string_view {
absl::Nonnull<const char*> str)
: ptr_(str), length_(str ? StrlenInternal(str) : 0) {}

// Implicit constructor of a `string_view` from a `const char*` and length.
// Constructor of a `string_view` from a `const char*` and length.
constexpr string_view(absl::Nullable<const char*> data, size_type len)
: ptr_(data), length_(CheckLengthInternal(len)) {}

Expand Down

0 comments on commit 7bc6543

Please sign in to comment.