changed hectare to an alias_unit

This commit is contained in:
Ramzi Sabra
2020-04-17 06:42:35 +03:00
committed by Mateusz Pusz
parent 6f8bddc832
commit 7b8ad8e37c
2 changed files with 3 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ struct square_exametre : deduced_unit<square_exametre, dim_area, exametre> {};
struct square_zettametre : deduced_unit<square_zettametre, dim_area, zettametre> {};
struct square_yottametre : deduced_unit<square_yottametre, dim_area, yottametre> {};
using hectare = square_hectometre;
struct hectare : alias_unit<square_hectometre, "ha"> {};
template<Unit U, Scalar Rep = double>
using area = quantity<dim_area, U, Rep>;

View File

@@ -274,6 +274,8 @@ static_assert(10q_km * 10q_km == 100q_km2);
static_assert(1q_m2 == 10'000q_cm2);
static_assert(1q_ha == 10'000q_m2);
static_assert(hectare::symbol == "ha");
static_assert(detail::unit_text<dim_area, square_metre>() == basic_symbol_text("", "m^2"));
// volume