/* * Copyright (C) 2015-present ScyllaDB */ /* * SPDX-License-Identifier: AGPL-3.0-or-later */ #pragma once #include #include #if FMT_VERSION >= 100000 #include #else #include #endif #if FMT_VERSION < 100000 template struct fmt::formatter> : fmt::formatter { template auto format(const std::optional& opt, FormatContext& ctx) const { if (opt) { return fmt::format_to(ctx.out(), "{}", *opt); } else { return fmt::format_to(ctx.out(), "{{}}"); } } }; #endif template <> struct fmt::formatter : fmt::formatter { auto format(std::strong_ordering, fmt::format_context& ctx) const -> decltype(ctx.out()); }; template <> struct fmt::formatter : fmt::formatter { auto format(std::weak_ordering, fmt::format_context& ctx) const -> decltype(ctx.out()); }; template <> struct fmt::formatter : fmt::formatter { auto format(std::partial_ordering, fmt::format_context& ctx) const -> decltype(ctx.out()); };