}
std::string fmt_print() const
- requires has_formatter<KeyT> {
+ requires fmt::formattable<KeyT> {
std::string s = "{";
int c = (int)size();
for (auto k : *this) {
// vim: ts=8 sw=2 smarttab
#pragma once
+#include <fmt/base.h>
#include <optional>
+#include <type_traits>
/**
* \file default fmtlib formatters for specifically-tagged types
* such classes in Crimson.
*/
-template <typename T>
-concept has_formatter = fmt::has_formatter<T, fmt::format_context>::value;
+#if FMT_VERSION < 110000
+// TODO: drop me once fmt v11 is required
+namespace fmt {
+ template <typename T, typename Char = char>
+ concept formattable = is_formattable<std::remove_reference_t<T>, Char>::value>;
+}
+#endif
/**
* Tagging classes that provide support for default fmtlib formatting,
}
std::string fmt_print() const
- requires has_formatter<K> {
+ requires fmt::formattable<K> {
std::string str = "{";
bool first = true;
for (auto &&i: *this) {
}
std::string fmt_print() const
- requires has_formatter<KeyT> && has_formatter<ValueT> {
+ requires fmt::formattable<KeyT> && fmt::formattable<ValueT> {
int c = (int)_size;
std::string s = "{";
for (auto&& [k, v] : *this) {
}
};
-template <typename T, has_formatter V>
+template <typename T, fmt::formattable V>
struct value_event_t : sc::event<T> {
const V value;
}
std::string fmt_print() const
- requires has_formatter<T> {
+ requires fmt::formattable<T> {
std::string s = "[";
bool first = true;
for (const auto& [start, len] : *this) {
/// explicit release request from the Primary
OP_EV(ReplicaRelease);
-template <typename T, has_formatter V>
+template <typename T, fmt::formattable V>
struct value_event_t : sc::event<T> {
const V value;