diff options
Diffstat (limited to 'absl/status/status.h')
-rw-r--r-- | absl/status/status.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/absl/status/status.h b/absl/status/status.h index 2f03bb64..dc37493a 100644 --- a/absl/status/status.h +++ b/absl/status/status.h @@ -64,7 +64,6 @@ #include "absl/functional/function_ref.h" #include "absl/status/internal/status_internal.h" #include "absl/strings/cord.h" -#include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" @@ -523,6 +522,12 @@ class Status final { std::string ToString( StatusToStringMode mode = StatusToStringMode::kDefault) const; + // Support `absl::StrCat`, `absl::StrFormat`, etc. + template <typename Sink> + friend void AbslStringify(Sink& sink, const Status& status) { + sink.Append(status.ToString(StatusToStringMode::kWithEverything)); + } + // Status::IgnoreError() // // Ignores any errors. This method does nothing except potentially suppress |