summaryrefslogtreecommitdiff
path: root/absl/strings
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-08-08 12:02:35 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-08-08 12:03:36 -0700
commitf850728a8afc2871b50a4d95cb4ccea4d3016b75 (patch)
tree651997da2647c6269b8dbd3282c3009cb54b6853 /absl/strings
parent0ddbfd530c9124c21021970dfaeb2aa5ada57b51 (diff)
Add ATTRIBUTE_LIFETIME_BOUND to Cord::Flatten and TryFlat
PiperOrigin-RevId: 554898945 Change-Id: Id19acf5af56b1e7877cd73ac8420cf8e1a841b64
Diffstat (limited to 'absl/strings')
-rw-r--r--absl/strings/cord.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/absl/strings/cord.h b/absl/strings/cord.h
index f800207b..0c7727d4 100644
--- a/absl/strings/cord.h
+++ b/absl/strings/cord.h
@@ -737,14 +737,15 @@ class Cord {
//
// If this cord's representation is a single flat array, returns a
// string_view referencing that array. Otherwise returns nullopt.
- absl::optional<absl::string_view> TryFlat() const;
+ absl::optional<absl::string_view> TryFlat() const
+ ABSL_ATTRIBUTE_LIFETIME_BOUND;
// Cord::Flatten()
//
// Flattens the cord into a single array and returns a view of the data.
//
// If the cord was already flat, the contents are not modified.
- absl::string_view Flatten();
+ absl::string_view Flatten() ABSL_ATTRIBUTE_LIFETIME_BOUND;
// Supports absl::Cord as a sink object for absl::Format().
friend void AbslFormatFlush(absl::Cord* cord, absl::string_view part) {