From 42631446141f75564e07d17950e38a7a9cd32674 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 3 May 2024 21:36:51 -0400 Subject: [PATCH] xo-unit: rename scaled_unit o/load of rescale() -> rescale_ext() --- example/ex1/ex1.cpp | 2 +- example/ex2/ex2.cpp | 2 +- include/xo/unit/quantity.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/ex1/ex1.cpp b/example/ex1/ex1.cpp index 4b138a50..cc6ee8cb 100644 --- a/example/ex1/ex1.cpp +++ b/example/ex1/ex1.cpp @@ -43,7 +43,7 @@ main () { static_assert(a.scale() == 0.625); static_assert(a.abbrev() == flatstring("km.min^-2")); - constexpr auto a2 = a.rescale<(su::meter / (su::second * su::second))>(); + constexpr auto a2 = a.rescale_ext<(su::meter / (su::second * su::second))>(); cerr << "d.t^-2: " << a2 << endl; diff --git a/example/ex2/ex2.cpp b/example/ex2/ex2.cpp index 936704d9..f2116570 100644 --- a/example/ex2/ex2.cpp +++ b/example/ex2/ex2.cpp @@ -24,7 +24,7 @@ main () { << ", d.t^-2: " << a << endl; - constexpr auto a2 = a.template rescale(); + constexpr auto a2 = a.rescale_ext(); static_assert(a2.abbrev() == flatstring("m.s^-2")); diff --git a/include/xo/unit/quantity.hpp b/include/xo/unit/quantity.hpp index d17d7624..25558491 100644 --- a/include/xo/unit/quantity.hpp +++ b/include/xo/unit/quantity.hpp @@ -76,7 +76,7 @@ namespace xo { template ScaledUnit2> constexpr - auto rescale() const { + auto rescale_ext() const { /* conversion factor from .unit -> unit2*/ auto rr = detail::su_ratio(NaturalUnit, ScaledUnit2.natural_unit_);