From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/osd/object_state_fmt.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/osd/object_state_fmt.h (limited to 'src/osd/object_state_fmt.h') diff --git a/src/osd/object_state_fmt.h b/src/osd/object_state_fmt.h new file mode 100644 index 000000000..6b6350b94 --- /dev/null +++ b/src/osd/object_state_fmt.h @@ -0,0 +1,23 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +#pragma once +/** + * \file fmtlib formatters for some types.h classes + */ + +#include "osd/object_state.h" +#include "osd/osd_types_fmt.h" +#if FMT_VERSION >= 90000 +#include +#endif + +template <> +struct fmt::formatter { + constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } + + template + auto format(const ObjectState& os, FormatContext& ctx) const + { + return fmt::format_to(ctx.out(), "exists {} oi {}", os.exists, os.oi); + } +}; -- cgit v1.2.3