forked from mpusz/mp-units
meter renamed to metre
This commit is contained in:
@@ -32,14 +32,14 @@ namespace std::experimental::units {
|
||||
template<typename T>
|
||||
concept bool Acceleration = Quantity<T> && std::Same<typename T::dimension, dimension_acceleration>;
|
||||
|
||||
struct meter_per_second_sq : derived_unit<dimension_acceleration, meter, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<meter_per_second_sq>> : downcast_to<meter_per_second_sq> {};
|
||||
struct metre_per_second_sq : derived_unit<dimension_acceleration, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<metre_per_second_sq>> : downcast_to<metre_per_second_sq> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// mps_sq
|
||||
constexpr auto operator""mps_sq(unsigned long long l) { return quantity<meter_per_second_sq, std::int64_t>(l); }
|
||||
constexpr auto operator""mps_sq(long double l) { return quantity<meter_per_second_sq, long double>(l); }
|
||||
constexpr auto operator""mps_sq(unsigned long long l) { return quantity<metre_per_second_sq, std::int64_t>(l); }
|
||||
constexpr auto operator""mps_sq(long double l) { return quantity<metre_per_second_sq, long double>(l); }
|
||||
|
||||
} // namespace literals
|
||||
|
||||
|
||||
+16
-16
@@ -32,17 +32,17 @@ namespace std::experimental::units {
|
||||
template<typename T>
|
||||
concept bool Area = Quantity<T> && std::Same<typename T::dimension, dimension_area>;
|
||||
|
||||
struct square_millimeter : derived_unit<dimension_area, millimeter> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_millimeter>> : downcast_to<square_millimeter> {};
|
||||
struct square_millimetre : derived_unit<dimension_area, millimetre> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_millimetre>> : downcast_to<square_millimetre> {};
|
||||
|
||||
struct square_centimeter : derived_unit<dimension_area, centimeter> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_centimeter>> : downcast_to<square_centimeter> {};
|
||||
struct square_centimetre : derived_unit<dimension_area, centimetre> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_centimetre>> : downcast_to<square_centimetre> {};
|
||||
|
||||
struct square_meter : derived_unit<dimension_area, meter> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_meter>> : downcast_to<square_meter> {};
|
||||
struct square_metre : derived_unit<dimension_area, metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_metre>> : downcast_to<square_metre> {};
|
||||
|
||||
struct square_kilometer : derived_unit<dimension_area, kilometer, meter> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_kilometer>> : downcast_to<square_kilometer> {};
|
||||
struct square_kilometre : derived_unit<dimension_area, kilometre, metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_kilometre>> : downcast_to<square_kilometre> {};
|
||||
|
||||
struct square_foot : derived_unit<dimension_area, foot> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_foot>> : downcast_to<square_foot> {};
|
||||
@@ -50,20 +50,20 @@ namespace std::experimental::units {
|
||||
inline namespace literals {
|
||||
|
||||
// sq_mm
|
||||
constexpr auto operator""sq_mm(unsigned long long l) { return quantity<square_millimeter, std::int64_t>(l); }
|
||||
constexpr auto operator""sq_mm(long double l) { return quantity<square_millimeter, long double>(l); }
|
||||
constexpr auto operator""sq_mm(unsigned long long l) { return quantity<square_millimetre, std::int64_t>(l); }
|
||||
constexpr auto operator""sq_mm(long double l) { return quantity<square_millimetre, long double>(l); }
|
||||
|
||||
// sq_cm
|
||||
constexpr auto operator""sq_cm(unsigned long long l) { return quantity<square_centimeter, std::int64_t>(l); }
|
||||
constexpr auto operator""sq_cm(long double l) { return quantity<square_centimeter, long double>(l); }
|
||||
constexpr auto operator""sq_cm(unsigned long long l) { return quantity<square_centimetre, std::int64_t>(l); }
|
||||
constexpr auto operator""sq_cm(long double l) { return quantity<square_centimetre, long double>(l); }
|
||||
|
||||
// sq_m
|
||||
constexpr auto operator""sq_m(unsigned long long l) { return quantity<square_meter, std::int64_t>(l); }
|
||||
constexpr auto operator""sq_m(long double l) { return quantity<square_meter, long double>(l); }
|
||||
constexpr auto operator""sq_m(unsigned long long l) { return quantity<square_metre, std::int64_t>(l); }
|
||||
constexpr auto operator""sq_m(long double l) { return quantity<square_metre, long double>(l); }
|
||||
|
||||
// sq_km
|
||||
constexpr auto operator""sq_km(unsigned long long l) { return quantity<square_kilometer, std::int64_t>(l); }
|
||||
constexpr auto operator""sq_km(long double l) { return quantity<square_kilometer, long double>(l); }
|
||||
constexpr auto operator""sq_km(unsigned long long l) { return quantity<square_kilometre, std::int64_t>(l); }
|
||||
constexpr auto operator""sq_km(long double l) { return quantity<square_kilometre, long double>(l); }
|
||||
|
||||
} // namespace literals
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace std::experimental::units {
|
||||
template<typename T>
|
||||
concept bool Capacitance = Quantity<T> && std::Same<typename T::dimension, dimension_capacitance>;
|
||||
|
||||
struct farad : derived_unit<dimension_capacitance, kilogram, meter, second, ampere> {};
|
||||
struct farad : derived_unit<dimension_capacitance, kilogram, metre, second, ampere> {};
|
||||
template<> struct downcasting_traits<downcast_from<farad>> : downcast_to<farad> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace std::experimental::units {
|
||||
template<typename T>
|
||||
concept bool Energy = Quantity<T> && std::Same<typename T::dimension, dimension_energy>;
|
||||
|
||||
struct joule : derived_unit<dimension_energy, kilogram, meter, second> {};
|
||||
struct joule : derived_unit<dimension_energy, kilogram, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<joule>> : downcast_to<joule> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace std::experimental::units {
|
||||
template<typename T>
|
||||
concept bool Force = Quantity<T> && std::Same<typename T::dimension, dimension_force>;
|
||||
|
||||
struct newton : derived_unit<dimension_force, kilogram, meter, second> {};
|
||||
struct newton : derived_unit<dimension_force, kilogram, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<newton>> : downcast_to<newton> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
+16
-16
@@ -34,35 +34,35 @@ namespace std::experimental::units {
|
||||
concept bool Length = Quantity<T> && std::Same<typename T::dimension, dimension_length>;
|
||||
|
||||
// SI units
|
||||
struct meter : unit<dimension_length> {};
|
||||
template<> struct downcasting_traits<downcast_from<meter>> : downcast_to<meter> {};
|
||||
struct metre : unit<dimension_length> {};
|
||||
template<> struct downcasting_traits<downcast_from<metre>> : downcast_to<metre> {};
|
||||
|
||||
struct millimeter : milli<meter> {};
|
||||
template<> struct downcasting_traits<downcast_from<millimeter>> : downcast_to<millimeter> {};
|
||||
struct millimetre : milli<metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<millimetre>> : downcast_to<millimetre> {};
|
||||
|
||||
struct centimeter : centi<meter> {};
|
||||
template<> struct downcasting_traits<downcast_from<centimeter>> : downcast_to<centimeter> {};
|
||||
struct centimetre : centi<metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<centimetre>> : downcast_to<centimetre> {};
|
||||
|
||||
struct kilometer : kilo<meter> {};
|
||||
template<> struct downcasting_traits<downcast_from<kilometer>> : downcast_to<kilometer> {};
|
||||
struct kilometre : kilo<metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<kilometre>> : downcast_to<kilometre> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// mm
|
||||
constexpr auto operator""mm(unsigned long long l) { return quantity<millimeter, std::int64_t>(l); }
|
||||
constexpr auto operator""mm(long double l) { return quantity<millimeter, long double>(l); }
|
||||
constexpr auto operator""mm(unsigned long long l) { return quantity<millimetre, std::int64_t>(l); }
|
||||
constexpr auto operator""mm(long double l) { return quantity<millimetre, long double>(l); }
|
||||
|
||||
// cm
|
||||
constexpr auto operator""cm(unsigned long long l) { return quantity<centimeter, std::int64_t>(l); }
|
||||
constexpr auto operator""cm(long double l) { return quantity<centimeter, long double>(l); }
|
||||
constexpr auto operator""cm(unsigned long long l) { return quantity<centimetre, std::int64_t>(l); }
|
||||
constexpr auto operator""cm(long double l) { return quantity<centimetre, long double>(l); }
|
||||
|
||||
// m
|
||||
constexpr auto operator""m(unsigned long long l) { return quantity<meter, std::int64_t>(l); }
|
||||
constexpr auto operator""m(long double l) { return quantity<meter, long double>(l); }
|
||||
constexpr auto operator""m(unsigned long long l) { return quantity<metre, std::int64_t>(l); }
|
||||
constexpr auto operator""m(long double l) { return quantity<metre, long double>(l); }
|
||||
|
||||
// km
|
||||
constexpr auto operator""km(unsigned long long l) { return quantity<kilometer, std::int64_t>(l); }
|
||||
constexpr auto operator""km(long double l) { return quantity<kilometer, long double>(l); }
|
||||
constexpr auto operator""km(unsigned long long l) { return quantity<kilometre, std::int64_t>(l); }
|
||||
constexpr auto operator""km(long double l) { return quantity<kilometre, long double>(l); }
|
||||
|
||||
} // namespace literals
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace std::experimental::units {
|
||||
template<typename T>
|
||||
concept bool Power = Quantity<T> && std::Same<typename T::dimension, dimension_power>;
|
||||
|
||||
struct watt : derived_unit<dimension_power, kilogram, meter, second> {};
|
||||
struct watt : derived_unit<dimension_power, kilogram, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<watt>> : downcast_to<watt> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace std::experimental::units {
|
||||
template<typename T>
|
||||
concept bool Pressure = Quantity<T> && std::Same<typename T::dimension, dimension_pressure>;
|
||||
|
||||
struct pascal : derived_unit<dimension_pressure, kilogram, meter, second> {};
|
||||
struct pascal : derived_unit<dimension_pressure, kilogram, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<pascal>> : downcast_to<pascal> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -33,11 +33,11 @@ namespace std::experimental::units {
|
||||
template<typename T>
|
||||
concept bool Velocity = Quantity<T> && std::Same<typename T::dimension, dimension_velocity>;
|
||||
|
||||
struct meter_per_second : derived_unit<dimension_velocity, meter, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<meter_per_second>> : downcast_to<meter_per_second> {};
|
||||
struct metre_per_second : derived_unit<dimension_velocity, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<metre_per_second>> : downcast_to<metre_per_second> {};
|
||||
|
||||
struct kilometer_per_hour : derived_unit<dimension_velocity, kilometer, hour> {};
|
||||
template<> struct downcasting_traits<downcast_from<kilometer_per_hour>> : downcast_to<kilometer_per_hour> {};
|
||||
struct kilometre_per_hour : derived_unit<dimension_velocity, kilometre, hour> {};
|
||||
template<> struct downcasting_traits<downcast_from<kilometre_per_hour>> : downcast_to<kilometre_per_hour> {};
|
||||
|
||||
struct mile_per_hour : derived_unit<dimension_velocity, mile, hour> {};
|
||||
template<> struct downcasting_traits<downcast_from<mile_per_hour>> : downcast_to<mile_per_hour> {};
|
||||
@@ -45,12 +45,12 @@ namespace std::experimental::units {
|
||||
inline namespace literals {
|
||||
|
||||
// mps
|
||||
constexpr auto operator""mps(unsigned long long l) { return quantity<meter_per_second, std::int64_t>(l); }
|
||||
constexpr auto operator""mps(long double l) { return quantity<meter_per_second, long double>(l); }
|
||||
constexpr auto operator""mps(unsigned long long l) { return quantity<metre_per_second, std::int64_t>(l); }
|
||||
constexpr auto operator""mps(long double l) { return quantity<metre_per_second, long double>(l); }
|
||||
|
||||
// kmph
|
||||
constexpr auto operator""kmph(unsigned long long l) { return quantity<kilometer_per_hour, std::int64_t>(l); }
|
||||
constexpr auto operator""kmph(long double l) { return quantity<kilometer_per_hour, long double>(l); }
|
||||
constexpr auto operator""kmph(unsigned long long l) { return quantity<kilometre_per_hour, std::int64_t>(l); }
|
||||
constexpr auto operator""kmph(long double l) { return quantity<kilometre_per_hour, long double>(l); }
|
||||
|
||||
// mph
|
||||
constexpr auto operator""mph(unsigned long long l) { return quantity<mile_per_hour, std::int64_t>(l); }
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace std::experimental::units {
|
||||
template<typename T>
|
||||
concept bool Voltage = Quantity<T> && std::Same<typename T::dimension, dimension_voltage>;
|
||||
|
||||
struct volt : derived_unit<dimension_voltage, kilogram, meter, second, ampere> {};
|
||||
struct volt : derived_unit<dimension_voltage, kilogram, metre, second, ampere> {};
|
||||
template<> struct downcasting_traits<downcast_from<volt>> : downcast_to<volt> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
+16
-16
@@ -32,17 +32,17 @@ namespace std::experimental::units {
|
||||
template<typename T>
|
||||
concept bool Volume = Quantity<T> && std::Same<typename T::dimension, dimension_volume>;
|
||||
|
||||
struct cubic_millimeter : derived_unit<dimension_volume, millimeter> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_millimeter>> : downcast_to<cubic_millimeter> {};
|
||||
struct cubic_millimetre : derived_unit<dimension_volume, millimetre> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_millimetre>> : downcast_to<cubic_millimetre> {};
|
||||
|
||||
struct cubic_centimeter : derived_unit<dimension_volume, centimeter> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_centimeter>> : downcast_to<cubic_centimeter> {};
|
||||
struct cubic_centimetre : derived_unit<dimension_volume, centimetre> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_centimetre>> : downcast_to<cubic_centimetre> {};
|
||||
|
||||
struct cubic_meter : derived_unit<dimension_volume, meter> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_meter>> : downcast_to<cubic_meter> {};
|
||||
struct cubic_metre : derived_unit<dimension_volume, metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_metre>> : downcast_to<cubic_metre> {};
|
||||
|
||||
struct cubic_kilometer : derived_unit<dimension_volume, kilometer, meter> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_kilometer>> : downcast_to<cubic_kilometer> {};
|
||||
struct cubic_kilometre : derived_unit<dimension_volume, kilometre, metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_kilometre>> : downcast_to<cubic_kilometre> {};
|
||||
|
||||
struct cubic_foot : derived_unit<dimension_volume, foot> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_foot>> : downcast_to<cubic_foot> {};
|
||||
@@ -50,20 +50,20 @@ namespace std::experimental::units {
|
||||
inline namespace literals {
|
||||
|
||||
// cub_mm
|
||||
constexpr auto operator""cub_mm(unsigned long long l) { return quantity<cubic_millimeter, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_mm(long double l) { return quantity<cubic_millimeter, long double>(l); }
|
||||
constexpr auto operator""cub_mm(unsigned long long l) { return quantity<cubic_millimetre, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_mm(long double l) { return quantity<cubic_millimetre, long double>(l); }
|
||||
|
||||
// cub_cm
|
||||
constexpr auto operator""cub_cm(unsigned long long l) { return quantity<cubic_centimeter, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_cm(long double l) { return quantity<cubic_centimeter, long double>(l); }
|
||||
constexpr auto operator""cub_cm(unsigned long long l) { return quantity<cubic_centimetre, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_cm(long double l) { return quantity<cubic_centimetre, long double>(l); }
|
||||
|
||||
// cub_m
|
||||
constexpr auto operator""cub_m(unsigned long long l) { return quantity<cubic_meter, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_m(long double l) { return quantity<cubic_meter, long double>(l); }
|
||||
constexpr auto operator""cub_m(unsigned long long l) { return quantity<cubic_metre, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_m(long double l) { return quantity<cubic_metre, long double>(l); }
|
||||
|
||||
// cub_km
|
||||
constexpr auto operator""cub_km(unsigned long long l) { return quantity<cubic_kilometer, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_km(long double l) { return quantity<cubic_kilometer, long double>(l); }
|
||||
constexpr auto operator""cub_km(unsigned long long l) { return quantity<cubic_kilometre, std::int64_t>(l); }
|
||||
constexpr auto operator""cub_km(long double l) { return quantity<cubic_kilometre, long double>(l); }
|
||||
|
||||
} // namespace literals
|
||||
|
||||
|
||||
Reference in New Issue
Block a user