summaryrefslogtreecommitdiff
path: root/absl/strings/internal/has_absl_stringify.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-09-13 07:57:51 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-09-13 07:58:42 -0700
commit9e1789ffea47fdeb3133aa42aa9592f3673fb6ed (patch)
treea41313482e10f78947308b7a0aab28cdee09c501 /absl/strings/internal/has_absl_stringify.h
parent6c6b2733f8453f53e4e07fe4e311d52d51aad100 (diff)
Make `HasAbslStringify` public.
PiperOrigin-RevId: 565050503 Change-Id: I8f4c463be4ef513a2788745d1b454a7ede489152
Diffstat (limited to 'absl/strings/internal/has_absl_stringify.h')
-rw-r--r--absl/strings/internal/has_absl_stringify.h21
1 files changed, 5 insertions, 16 deletions
diff --git a/absl/strings/internal/has_absl_stringify.h b/absl/strings/internal/has_absl_stringify.h
index 55a08508..5eaddad1 100644
--- a/absl/strings/internal/has_absl_stringify.h
+++ b/absl/strings/internal/has_absl_stringify.h
@@ -18,31 +18,20 @@
#include <type_traits>
#include <utility>
-#include "absl/strings/string_view.h"
+#include "absl/base/attributes.h"
+#include "absl/strings/has_absl_stringify.h"
namespace absl {
ABSL_NAMESPACE_BEGIN
namespace strings_internal {
-// This is an empty class not intended to be used. It exists so that
-// `HasAbslStringify` can reference a universal class rather than needing to be
-// copied for each new sink.
-class UnimplementedSink {
- public:
- void Append(size_t count, char ch);
-
- void Append(string_view v);
-
- // Support `absl::Format(&sink, format, args...)`.
- friend void AbslFormatFlush(UnimplementedSink* sink, absl::string_view v);
-};
-
template <typename T, typename = void>
-struct HasAbslStringify : std::false_type {};
+struct ABSL_DEPRECATED("Use absl::HasAbslStringify") HasAbslStringify
+ : std::false_type {};
template <typename T>
-struct HasAbslStringify<
+struct ABSL_DEPRECATED("Use absl::HasAbslStringify") HasAbslStringify<
T, std::enable_if_t<std::is_void<decltype(AbslStringify(
std::declval<strings_internal::UnimplementedSink&>(),
std::declval<const T&>()))>::value>> : std::true_type {};