From 9310de2cb5cc4c85b54e7e90aa6cd88664380346 Mon Sep 17 00:00:00 2001 From: Dario Izzo Date: Thu, 20 Oct 2022 12:12:35 +0200 Subject: [PATCH] format for mpp missing integer<1> --- include/obake/detail/fmt_compat.hpp | 15 +++++++++++++++ include/obake/polynomials/d_packed_monomial.hpp | 4 ++-- include/obake/series.hpp | 4 +--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/include/obake/detail/fmt_compat.hpp b/include/obake/detail/fmt_compat.hpp index d42779e3..53023c66 100644 --- a/include/obake/detail/fmt_compat.hpp +++ b/include/obake/detail/fmt_compat.hpp @@ -61,4 +61,19 @@ struct ostream_formatter { } // namespace obake::detail +#if FMT_VERSION >= 90000L + +// fmt formatter for mppp:integer +// on top of the streaming operator. +namespace fmt +{ + +template <> +struct formatter> : obake::detail::ostream_formatter { +}; + +} // namespace fmt + +#endif + #endif \ No newline at end of file diff --git a/include/obake/polynomials/d_packed_monomial.hpp b/include/obake/polynomials/d_packed_monomial.hpp index 0b0f9621..fec94482 100644 --- a/include/obake/polynomials/d_packed_monomial.hpp +++ b/include/obake/polynomials/d_packed_monomial.hpp @@ -1427,8 +1427,8 @@ inline constexpr bool monomial_hash_is_homomorphic> namespace fmt { -template -struct formatter> : obake::detail::ostream_formatter { +template +struct formatter> : obake::detail::ostream_formatter { }; } // namespace fmt diff --git a/include/obake/series.hpp b/include/obake/series.hpp index 5b2b3d05..5d6cd7f0 100644 --- a/include/obake/series.hpp +++ b/include/obake/series.hpp @@ -38,9 +38,6 @@ #include #include -#include -#include - #include #include #include @@ -53,6 +50,7 @@ #include #include #include +#include #include #include #include