diff --git a/src/core/include/mp-units/ext/type_name.h b/src/core/include/mp-units/ext/type_name.h index 403ecd65..7f478fc8 100644 --- a/src/core/include/mp-units/ext/type_name.h +++ b/src/core/include/mp-units/ext/type_name.h @@ -41,6 +41,12 @@ template template struct type_name_less : std::bool_constant() < type_name()> {}; +template +[[nodiscard]] consteval std::string_view type_name(T) +{ + return type_name(); +} + // This is typically used to deterministically chose one of the alternatives // to guarantee the commutation of the operation (e.g., `a + b` should return // the same type as `b + a`).