forked from mpusz/mp-units
Square and cubic UDLs renamed
This commit is contained in:
@@ -38,9 +38,9 @@ using area = quantity<dim_area, U, Rep>;
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// sq_cm
|
||||
constexpr auto operator"" sq_cm(unsigned long long l) { return area<square_centimetre, std::int64_t>(l); }
|
||||
constexpr auto operator"" sq_cm(long double l) { return area<square_centimetre, long double>(l); }
|
||||
// cm2
|
||||
constexpr auto operator"" cm2(unsigned long long l) { return area<square_centimetre, std::int64_t>(l); }
|
||||
constexpr auto operator"" cm2(long double l) { return area<square_centimetre, long double>(l); }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@ using acceleration = quantity<dim_acceleration, U, Rep>;
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// mps_sq
|
||||
constexpr auto operator""mps_sq(unsigned long long l) { return acceleration<metre_per_second_sq, std::int64_t>(l); }
|
||||
constexpr auto operator""mps_sq(long double l) { return acceleration<metre_per_second_sq, long double>(l); }
|
||||
// mps2
|
||||
constexpr auto operator""mps2(unsigned long long l) { return acceleration<metre_per_second_sq, std::int64_t>(l); }
|
||||
constexpr auto operator""mps2(long double l) { return acceleration<metre_per_second_sq, long double>(l); }
|
||||
|
||||
} // namespace literals
|
||||
|
||||
|
||||
@@ -42,21 +42,21 @@ using area = quantity<dim_area, U, Rep>;
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// sq_m
|
||||
constexpr auto operator"" sq_m(unsigned long long l) { return area<square_metre, std::int64_t>(l); }
|
||||
constexpr auto operator"" sq_m(long double l) { return area<square_metre, long double>(l); }
|
||||
// m2
|
||||
constexpr auto operator"" m2(unsigned long long l) { return area<square_metre, std::int64_t>(l); }
|
||||
constexpr auto operator"" m2(long double l) { return area<square_metre, long double>(l); }
|
||||
|
||||
// sq_mm
|
||||
constexpr auto operator"" sq_mm(unsigned long long l) { return area<square_millimetre, std::int64_t>(l); }
|
||||
constexpr auto operator"" sq_mm(long double l) { return area<square_millimetre, long double>(l); }
|
||||
// mm2
|
||||
constexpr auto operator"" mm2(unsigned long long l) { return area<square_millimetre, std::int64_t>(l); }
|
||||
constexpr auto operator"" mm2(long double l) { return area<square_millimetre, long double>(l); }
|
||||
|
||||
// sq_cm
|
||||
constexpr auto operator"" sq_cm(unsigned long long l) { return area<square_centimetre, std::int64_t>(l); }
|
||||
constexpr auto operator"" sq_cm(long double l) { return area<square_centimetre, long double>(l); }
|
||||
// cm2
|
||||
constexpr auto operator"" cm2(unsigned long long l) { return area<square_centimetre, std::int64_t>(l); }
|
||||
constexpr auto operator"" cm2(long double l) { return area<square_centimetre, long double>(l); }
|
||||
|
||||
// sq_km
|
||||
constexpr auto operator"" sq_km(unsigned long long l) { return area<square_kilometre, std::int64_t>(l); }
|
||||
constexpr auto operator"" sq_km(long double l) { return area<square_kilometre, long double>(l); }
|
||||
// km2
|
||||
constexpr auto operator"" km2(unsigned long long l) { return area<square_kilometre, std::int64_t>(l); }
|
||||
constexpr auto operator"" km2(long double l) { return area<square_kilometre, long double>(l); }
|
||||
|
||||
// ha
|
||||
constexpr auto operator"" ha(unsigned long long l) { return area<hectare, std::int64_t>(l); }
|
||||
|
||||
@@ -43,21 +43,21 @@ using volume = quantity<dim_volume, U, Rep>;
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// cub_mm
|
||||
constexpr auto operator""cub_mm(unsigned long long l) { return volume<cubic_millimetre, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_mm(long double l) { return volume<cubic_millimetre, long double>(l); }
|
||||
// mm3
|
||||
constexpr auto operator""mm3(unsigned long long l) { return volume<cubic_millimetre, std::int64_t>(l); }
|
||||
constexpr auto operator""mm3(long double l) { return volume<cubic_millimetre, long double>(l); }
|
||||
|
||||
// cub_cm
|
||||
constexpr auto operator""cub_cm(unsigned long long l) { return volume<cubic_centimetre, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_cm(long double l) { return volume<cubic_centimetre, long double>(l); }
|
||||
// cm3
|
||||
constexpr auto operator""cm3(unsigned long long l) { return volume<cubic_centimetre, std::int64_t>(l); }
|
||||
constexpr auto operator""cm3(long double l) { return volume<cubic_centimetre, long double>(l); }
|
||||
|
||||
// cub_m
|
||||
constexpr auto operator""cub_m(unsigned long long l) { return volume<cubic_metre, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_m(long double l) { return volume<cubic_metre, long double>(l); }
|
||||
// m3
|
||||
constexpr auto operator""m3(unsigned long long l) { return volume<cubic_metre, std::int64_t>(l); }
|
||||
constexpr auto operator""m3(long double l) { return volume<cubic_metre, long double>(l); }
|
||||
|
||||
// cub_km
|
||||
constexpr auto operator""cub_km(unsigned long long l) { return volume<cubic_kilometre, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_km(long double l) { return volume<cubic_kilometre, long double>(l); }
|
||||
// km3
|
||||
constexpr auto operator""km3(unsigned long long l) { return volume<cubic_kilometre, std::int64_t>(l); }
|
||||
constexpr auto operator""km3(long double l) { return volume<cubic_kilometre, long double>(l); }
|
||||
|
||||
// l
|
||||
constexpr auto operator""_l(unsigned long long l) { return volume<litre, std::int64_t>(l); }
|
||||
|
||||
@@ -31,9 +31,9 @@ struct square_foot : deduced_unit<square_foot, si::dim_area, foot> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// sq_ft
|
||||
constexpr auto operator"" sq_ft(unsigned long long l) { return si::area<square_foot, std::int64_t>(l); }
|
||||
constexpr auto operator"" sq_ft(long double l) { return si::area<square_foot, long double>(l); }
|
||||
// ft2
|
||||
constexpr auto operator"" ft2(unsigned long long l) { return si::area<square_foot, std::int64_t>(l); }
|
||||
constexpr auto operator"" ft2(long double l) { return si::area<square_foot, long double>(l); }
|
||||
|
||||
} // namespace literals
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ struct cubic_foot : deduced_unit<cubic_foot, si::dim_volume, foot> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// cub_ft
|
||||
constexpr auto operator""cub_ft(unsigned long long l) { return si::volume<cubic_foot, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_ft(long double l) { return si::volume<cubic_foot, long double>(l); }
|
||||
// ft3
|
||||
constexpr auto operator""ft3(unsigned long long l) { return si::volume<cubic_foot, std::int64_t>(l); }
|
||||
constexpr auto operator""ft3(long double l) { return si::volume<cubic_foot, long double>(l); }
|
||||
|
||||
} // namespace literals
|
||||
|
||||
|
||||
Reference in New Issue
Block a user