From d5a0874bea51344d028a0481c408dca793e20924 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Fri, 29 Sep 2023 06:30:28 +0200 Subject: [PATCH] fix: symbols of named dimensionless units with the ratio = 1 were not printed --- src/core/include/mp-units/unit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/include/mp-units/unit.h b/src/core/include/mp-units/unit.h index a15b0f7c..c4343c45 100644 --- a/src/core/include/mp-units/unit.h +++ b/src/core/include/mp-units/unit.h @@ -695,7 +695,7 @@ constexpr Out print_separator(Out out, unit_symbol_formatting fmt) template [[nodiscard]] consteval bool has_unit_symbol(U) { - return !std::derived_from>; + return requires { U::symbol; } || !std::derived_from>; } template Out, Unit U>