// SPDX-License-Identifier: GPL-3.0-or-later // Copyright © 2023 Strato Team and Contributors (https://github.com/strato-emu/) #pragma once #include #include namespace fmt { /** * @brief A std::bitset formatter for {fmt} */ template struct formatter> : formatter { template constexpr auto format(const std::bitset &s, FormatContext &ctx) { return formatter::format(s.to_string(), ctx); } }; template requires std::is_enum_v struct formatter : formatter> { template constexpr auto format(T s, FormatContext &ctx) { return formatter>::format(static_cast>(s), ctx); } }; }