diff --git a/libs/util/include/psemek/util/fixed_point.hpp b/libs/util/include/psemek/util/fixed_point.hpp index b632135f..021ea4dd 100644 --- a/libs/util/include/psemek/util/fixed_point.hpp +++ b/libs/util/include/psemek/util/fixed_point.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace psemek::util { @@ -455,3 +456,21 @@ namespace psemek::util } } + +namespace std +{ + + template + struct formatter<::psemek::util::fixed_point, Char> + : formatter + { + using base = formatter; + + template + auto format(::psemek::util::fixed_point const & fp, FormatContext & ctx) const + { + return base::format(static_cast(fp), ctx); + } + }; + +}