feat: all tags in the expression templates are now ordered by the type names

Resolves #499
This commit is contained in:
Mateusz Pusz committed 2024-07-12 17:48:38 +02:00
1 parent f0e94e06da
commit adbc77432e
5 files changed
+10 -10

No files matched your search

@@ -29,6 +29,7 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/fixed_string.h>
#include <mp-units/ext/inplace_vector.h>
#include <mp-units/ext/type_name.h>
#include <mp-units/ext/type_traits.h>
#include <mp-units/framework/dimension_concepts.h>
#include <mp-units/framework/expression_template.h>
@@ -55,7 +56,7 @@ MP_UNITS_EXPORT struct dimension_one;
namespace detail {
template<typename Lhs, typename Rhs>
struct base_dimension_less : std::bool_constant<(Lhs::symbol < Rhs::symbol)> {};
struct base_dimension_less : std::bool_constant<type_name<Lhs>() < type_name<Rhs>()> {};
template<typename T1, typename T2>
using type_list_of_base_dimension_less = expr_less<T1, T2, base_dimension_less>;
+1 -1
View File
@@ -108,7 +108,7 @@ template<Unit T, auto M, typename U>
[[nodiscard]] consteval auto get_canonical_unit_impl(T, const scaled_unit_impl<M, U>&);
template<Unit Lhs, Unit Rhs>
struct unit_less : std::bool_constant<(Lhs::symbol < Rhs::symbol)> {};
struct unit_less : std::bool_constant<type_name<Lhs>() < type_name<Rhs>()> {};
template<typename T1, typename T2>
using type_list_of_unit_less = expr_less<T1, T2, unit_less>;