From 85c701da92817ee4ee36509c12d6f4ae7381c9f3 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 16 Dec 2024 07:00:03 -0800 Subject: [PATCH] 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 --- absl/strings/string_view.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/absl/strings/string_view.h b/absl/strings/string_view.h index c23ef592ce3..c87602a6a82 100644 --- a/absl/strings/string_view.h +++ b/absl/strings/string_view.h @@ -204,9 +204,8 @@ class ABSL_ATTRIBUTE_VIEW string_view { constexpr string_view(absl::Nullable 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