diff --git a/src/core/include/units/unit.h b/src/core/include/units/unit.h index c36c402a..edb70196 100644 --- a/src/core/include/units/unit.h +++ b/src/core/include/units/unit.h @@ -592,29 +592,30 @@ template namespace detail { -consteval bool same_canonical_reference_unit(...) { return false; } +[[nodiscard]] consteval bool same_canonical_reference_unit(...) { return false; } template -consteval bool same_canonical_reference_unit(const named_unit&, const named_unit&) +[[nodiscard]] consteval bool same_canonical_reference_unit(const named_unit&, + const named_unit&) { return true; } template -consteval bool same_canonical_reference_unit(const power&, const power&) +[[nodiscard]] consteval bool same_canonical_reference_unit(const power&, const power&) { return same_canonical_reference_unit(F1{}, F2{}); } template requires(sizeof...(Us1) == sizeof...(Us2)) -consteval bool same_canonical_reference_unit(const type_list&, const type_list&) +[[nodiscard]] consteval bool same_canonical_reference_unit(const type_list&, const type_list&) { return (... && same_canonical_reference_unit(Us1{}, Us2{})); } template -consteval bool same_canonical_reference_unit(const derived_unit&, const derived_unit&) +[[nodiscard]] consteval bool same_canonical_reference_unit(const derived_unit&, const derived_unit&) { return same_canonical_reference_unit(typename derived_unit::_num_{}, typename derived_unit::_num_{}) &&