diff --git a/vowpalwabbit/automl.h b/vowpalwabbit/automl.h index 95064b1d899..fa296041d31 100644 --- a/vowpalwabbit/automl.h +++ b/vowpalwabbit/automl.h @@ -188,8 +188,10 @@ size_t write_model_field(io_buf&, const VW::automl::interaction_config_manager&, } // namespace model_utils } // namespace VW +namespace fmt +{ template <> -struct fmt::formatter : formatter +struct formatter : formatter { auto format(VW::automl::automl_state c, format_context& ctx) -> decltype(ctx.out()) { @@ -198,10 +200,11 @@ struct fmt::formatter : formatter }; template <> -struct fmt::formatter : formatter +struct formatter : formatter { auto format(VW::automl::config_state c, format_context& ctx) -> decltype(ctx.out()) { return formatter::format(std::string{VW::to_string(c)}, ctx); } -}; \ No newline at end of file +}; +} // namespace fmt \ No newline at end of file diff --git a/vowpalwabbit/ccb_label.h b/vowpalwabbit/ccb_label.h index aec03f14a9a..7b2b79ded8b 100644 --- a/vowpalwabbit/ccb_label.h +++ b/vowpalwabbit/ccb_label.h @@ -125,11 +125,14 @@ size_t write_model_field(io_buf&, const CCB::label&, const std::string&, bool); } // namespace model_utils } // namespace VW +namespace fmt +{ template <> -struct fmt::formatter : formatter +struct formatter : formatter { auto format(CCB::example_type c, format_context& ctx) -> decltype(ctx.out()) { return formatter::format(std::string{VW::to_string(c)}, ctx); } }; +} // namespace fmt diff --git a/vowpalwabbit/slates_label.h b/vowpalwabbit/slates_label.h index 84f56beacc0..4f99452eee2 100644 --- a/vowpalwabbit/slates_label.h +++ b/vowpalwabbit/slates_label.h @@ -72,11 +72,14 @@ size_t write_model_field(io_buf&, const VW::slates::label&, const std::string&, } // namespace model_utils } // namespace VW +namespace fmt +{ template <> -struct fmt::formatter : formatter +struct formatter : formatter { auto format(VW::slates::example_type c, format_context& ctx) -> decltype(ctx.out()) { return formatter::format(std::string{VW::to_string(c)}, ctx); } -}; \ No newline at end of file +}; +} // namespace fmt \ No newline at end of file