Skip to content

Commit 5ea9fd4

Browse files
gitsbiHendrik Schober
authored andcommitted
do not define quantities per retag or rescale to prevent overloading failing due to non-deducable contexts
1 parent 55e62a4 commit 5ea9fd4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

common.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@ template<typename V> using liter_per_hour = div_quantity_t<liter<V>, hour<
291291
* @tparam T tag
292292
* @tparam S scale
293293
*/
294-
template<typename V, typename T, typename S=scale_t<1>> using scalar = quantity<dimensionless, S, V, T>;
295-
template<typename V, typename S=scale_t<1>> using fraction = scalar<V, no_tag, S>;
296-
template<typename V> using percent = typename fraction<V>::template rescale_by<centi_scaling>;
297-
template<typename V> using permill = typename fraction<V>::template rescale_by<milli_scaling>;
294+
template<typename V, typename T , typename S=scale_t<1>> using scalar = quantity<dimensionless, S, V, T>;
295+
template<typename V, typename T=no_tag, typename S=scale_t<1>> using fraction = scalar<V, T, S>;
296+
template<typename V, typename T=no_tag> using percent = scalar<V, T, centi_scaling>;
297+
template<typename V, typename T=no_tag> using permill = scalar<V, T, milli_scaling>;
298298
/** @} */
299299

300300
/** @{
@@ -415,7 +415,7 @@ UNLIB_DEFINE_QUANTITY_LITERAL_TRAITS_NOSCALE( square_kilometer , "km2"
415415
UNLIB_DEFINE_QUANTITY_LITERAL_TRAITS_NOSCALE( hectare , "ha" )
416416

417417
UNLIB_DEFINE_QUANTITY_LITERAL_TRAITS_NOSCALE( cubic_millimeter , "mm3" )
418-
//UNLIB_DEFINE_QUANTITY_LITERAL_TRAITS_NOSCALE( cubic_centimet er, "cm3" ) // alias of ml
418+
//UNLIB_DEFINE_QUANTITY_LITERAL_TRAITS_NOSCALE( cubic_centimeter , "cm3" ) // alias of ml
419419
UNLIB_DEFINE_QUANTITY_LITERAL_TRAITS_NOSCALE( cubic_kilometer , "km3" )
420420

421421
UNLIB_DEFINE_QUANTITY_LITERAL_TRAITS_NOSCALE( milliliter , "ml" )

0 commit comments

Comments
 (0)