Skip to content

Commit 85c701d

Browse files
Abseil Teamcopybara-github
authored andcommitted
string_view: Add defaulted copy constructor and assignment
The defaulted copy constructor and assignment were removed to work around a gdb bug, but gdb now works without the workaround. PiperOrigin-RevId: 706694737 Change-Id: I5da06a29094f28a45a5910eab1f7a5155b34d57f
1 parent 5c28547 commit 85c701d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

absl/strings/string_view.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,8 @@ class ABSL_ATTRIBUTE_VIEW string_view {
204204
constexpr string_view(absl::Nullable<const char*> data, size_type len)
205205
: ptr_(data), length_(CheckLengthInternal(len)) {}
206206

207-
// NOTE: Harmlessly omitted to work around gdb bug.
208-
// constexpr string_view(const string_view&) noexcept = default;
209-
// string_view& operator=(const string_view&) noexcept = default;
207+
constexpr string_view(const string_view&) noexcept = default;
208+
string_view& operator=(const string_view&) noexcept = default;
210209

211210
// Iterators
212211

0 commit comments

Comments
 (0)