Skip to content

Commit

Permalink
string_view: Add defaulted copy constructor and assignment
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Abseil Team authored and copybara-github committed Dec 16, 2024
1 parent 5c28547 commit 85c701d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions absl/strings/string_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,8 @@ class ABSL_ATTRIBUTE_VIEW string_view {
constexpr string_view(absl::Nullable<const char*> data, size_type len)
: ptr_(data), length_(CheckLengthInternal(len)) {}

// NOTE: Harmlessly omitted to work around gdb bug.
// constexpr string_view(const string_view&) noexcept = default;
// string_view& operator=(const string_view&) noexcept = default;
constexpr string_view(const string_view&) noexcept = default;
string_view& operator=(const string_view&) noexcept = default;

// Iterators

Expand Down

0 comments on commit 85c701d

Please sign in to comment.