dimension_ prefix removed from names of derived dimensions
This commit is contained in:
1 parent
fa53d854ca
commit
1d94eb93e8
21 files changed
+109
-108
No files matched your search
@@ -26,13 +26,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_acceleration : make_dimension_t<exp<base_dim_length, 1>, exp<base_dim_time, -2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_acceleration>> : downcast_to<dimension_acceleration> {};
|
||||
struct acceleration : make_dimension_t<exp<base_dim_length, 1>, exp<base_dim_time, -2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<acceleration>> : downcast_to<acceleration> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Acceleration = Quantity<T> && std::Same<typename T::dimension, dimension_acceleration>;
|
||||
concept bool Acceleration = Quantity<T> && std::Same<typename T::dimension, acceleration>;
|
||||
|
||||
struct metre_per_second_sq : derived_unit<dimension_acceleration, metre, second> {};
|
||||
struct metre_per_second_sq : derived_unit<acceleration, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<metre_per_second_sq>> : downcast_to<metre_per_second_sq> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -26,25 +26,25 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_area : make_dimension_t<exp<base_dim_length, 2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_area>> : downcast_to<dimension_area> {};
|
||||
struct area : make_dimension_t<exp<base_dim_length, 2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<area>> : downcast_to<area> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Area = Quantity<T> && std::Same<typename T::dimension, dimension_area>;
|
||||
concept bool Area = Quantity<T> && std::Same<typename T::dimension, area>;
|
||||
|
||||
struct square_millimetre : derived_unit<dimension_area, millimetre> {};
|
||||
struct square_millimetre : derived_unit<area, millimetre> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_millimetre>> : downcast_to<square_millimetre> {};
|
||||
|
||||
struct square_centimetre : derived_unit<dimension_area, centimetre> {};
|
||||
struct square_centimetre : derived_unit<area, centimetre> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_centimetre>> : downcast_to<square_centimetre> {};
|
||||
|
||||
struct square_metre : derived_unit<dimension_area, metre> {};
|
||||
struct square_metre : derived_unit<area, metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_metre>> : downcast_to<square_metre> {};
|
||||
|
||||
struct square_kilometre : derived_unit<dimension_area, kilometre, metre> {};
|
||||
struct square_kilometre : derived_unit<area, kilometre, metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_kilometre>> : downcast_to<square_kilometre> {};
|
||||
|
||||
struct square_foot : derived_unit<dimension_area, foot> {};
|
||||
struct square_foot : derived_unit<area, foot> {};
|
||||
template<> struct downcasting_traits<downcast_from<square_foot>> : downcast_to<square_foot> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_capacitance : make_dimension_t<exp<base_dim_mass, -1>, exp<base_dim_length, -2>, exp<base_dim_time, 4>, exp<base_dim_current, 2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_capacitance>> : downcast_to<dimension_capacitance> {};
|
||||
struct capacitance : make_dimension_t<exp<base_dim_mass, -1>, exp<base_dim_length, -2>, exp<base_dim_time, 4>, exp<base_dim_current, 2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<capacitance>> : downcast_to<capacitance> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Capacitance = Quantity<T> && std::Same<typename T::dimension, dimension_capacitance>;
|
||||
concept bool Capacitance = Quantity<T> && std::Same<typename T::dimension, capacitance>;
|
||||
|
||||
struct farad : derived_unit<dimension_capacitance, kilogram, metre, second, ampere> {};
|
||||
struct farad : derived_unit<capacitance, kilogram, metre, second, ampere> {};
|
||||
template<> struct downcasting_traits<downcast_from<farad>> : downcast_to<farad> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_current : make_dimension_t<exp<base_dim_current, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_current>> : downcast_to<dimension_current> {};
|
||||
struct current : make_dimension_t<exp<base_dim_current, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<current>> : downcast_to<current> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Current = Quantity<T> && std::Same<typename T::dimension, dimension_current>;
|
||||
concept bool Current = Quantity<T> && std::Same<typename T::dimension, current>;
|
||||
|
||||
struct ampere : unit<dimension_current> {};
|
||||
struct ampere : unit<current> {};
|
||||
template<> struct downcasting_traits<downcast_from<ampere>> : downcast_to<ampere> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_electric_charge : make_dimension_t<exp<base_dim_time, 1>, exp<base_dim_current, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_electric_charge>> : downcast_to<dimension_electric_charge> {};
|
||||
struct electric_charge : make_dimension_t<exp<base_dim_time, 1>, exp<base_dim_current, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<electric_charge>> : downcast_to<electric_charge> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool ElectricCharge = Quantity<T> && std::Same<typename T::dimension, dimension_electric_charge>;
|
||||
concept bool ElectricCharge = Quantity<T> && std::Same<typename T::dimension, electric_charge>;
|
||||
|
||||
struct coulomb : derived_unit<dimension_electric_charge, second, ampere> {};
|
||||
struct coulomb : derived_unit<electric_charge, second, ampere> {};
|
||||
template<> struct downcasting_traits<downcast_from<coulomb>> : downcast_to<coulomb> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_energy : make_dimension_t<exp<base_dim_mass, 1>, exp<base_dim_length, 2>, exp<base_dim_time, -2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_energy>> : downcast_to<dimension_energy> {};
|
||||
struct energy : make_dimension_t<exp<base_dim_mass, 1>, exp<base_dim_length, 2>, exp<base_dim_time, -2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<energy>> : downcast_to<energy> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Energy = Quantity<T> && std::Same<typename T::dimension, dimension_energy>;
|
||||
concept bool Energy = Quantity<T> && std::Same<typename T::dimension, energy>;
|
||||
|
||||
struct joule : derived_unit<dimension_energy, kilogram, metre, second> {};
|
||||
struct joule : derived_unit<energy, kilogram, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<joule>> : downcast_to<joule> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_force : make_dimension_t<exp<base_dim_mass, 1>, exp<base_dim_length, 1>, exp<base_dim_time, -2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_force>> : downcast_to<dimension_force> {};
|
||||
struct force : make_dimension_t<exp<base_dim_mass, 1>, exp<base_dim_length, 1>, exp<base_dim_time, -2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<force>> : downcast_to<force> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Force = Quantity<T> && std::Same<typename T::dimension, dimension_force>;
|
||||
concept bool Force = Quantity<T> && std::Same<typename T::dimension, force>;
|
||||
|
||||
struct newton : derived_unit<dimension_force, kilogram, metre, second> {};
|
||||
struct newton : derived_unit<force, kilogram, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<newton>> : downcast_to<newton> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_frequency : make_dimension_t<exp<base_dim_time, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_frequency>> : downcast_to<dimension_frequency> {};
|
||||
struct frequency : make_dimension_t<exp<base_dim_time, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<frequency>> : downcast_to<frequency> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Frequency = Quantity<T> && std::Same<typename T::dimension, dimension_frequency>;
|
||||
concept bool Frequency = Quantity<T> && std::Same<typename T::dimension, frequency>;
|
||||
|
||||
struct hertz : derived_unit<dimension_frequency, second> {};
|
||||
struct hertz : derived_unit<frequency, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<hertz>> : downcast_to<hertz> {};
|
||||
|
||||
struct millihertz : milli<hertz> {};
|
||||
|
||||
@@ -27,14 +27,14 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_length : make_dimension_t<exp<base_dim_length, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_length>> : downcast_to<dimension_length> {};
|
||||
struct length : make_dimension_t<exp<base_dim_length, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<length>> : downcast_to<length> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Length = Quantity<T> && std::Same<typename T::dimension, dimension_length>;
|
||||
concept bool Length = Quantity<T> && std::Same<typename T::dimension, length>;
|
||||
|
||||
// SI units
|
||||
struct metre : unit<dimension_length> {};
|
||||
struct metre : unit<length> {};
|
||||
template<> struct downcasting_traits<downcast_from<metre>> : downcast_to<metre> {};
|
||||
|
||||
struct millimetre : milli<metre> {};
|
||||
@@ -67,16 +67,16 @@ namespace std::experimental::units {
|
||||
} // namespace literals
|
||||
|
||||
// US customary units
|
||||
struct yard : unit<dimension_length, ratio<9'144, 10'000>> {};
|
||||
struct yard : unit<length, ratio<9'144, 10'000>> {};
|
||||
template<> struct downcasting_traits<downcast_from<yard>> : downcast_to<yard> {};
|
||||
|
||||
struct foot : unit<dimension_length, ratio_multiply<ratio<1, 3>, yard::ratio>> {};
|
||||
struct foot : unit<length, ratio_multiply<ratio<1, 3>, yard::ratio>> {};
|
||||
template<> struct downcasting_traits<downcast_from<foot>> : downcast_to<foot> {};
|
||||
|
||||
struct inch : unit<dimension_length, ratio_multiply<ratio<1, 12>, foot::ratio>> {};
|
||||
struct inch : unit<length, ratio_multiply<ratio<1, 12>, foot::ratio>> {};
|
||||
template<> struct downcasting_traits<downcast_from<inch>> : downcast_to<inch> {};
|
||||
|
||||
struct mile : unit<dimension_length, ratio_multiply<ratio<1'760>, yard::ratio>> {};
|
||||
struct mile : unit<length, ratio_multiply<ratio<1'760>, yard::ratio>> {};
|
||||
template<> struct downcasting_traits<downcast_from<mile>> : downcast_to<mile> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_luminous_intensity : make_dimension_t<exp<base_dim_luminous_intensity, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_luminous_intensity>> : downcast_to<dimension_luminous_intensity> {};
|
||||
struct luminous_intensity : make_dimension_t<exp<base_dim_luminous_intensity, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<luminous_intensity>> : downcast_to<luminous_intensity> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool LuminousIntensity = Quantity<T> && std::Same<typename T::dimension, dimension_luminous_intensity>;
|
||||
concept bool LuminousIntensity = Quantity<T> && std::Same<typename T::dimension, luminous_intensity>;
|
||||
|
||||
struct candela : unit<dimension_luminous_intensity> {};
|
||||
struct candela : unit<luminous_intensity> {};
|
||||
template<> struct downcasting_traits<downcast_from<candela>> : downcast_to<candela> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_mass : make_dimension_t<exp<base_dim_mass, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_mass>> : downcast_to<dimension_mass> {};
|
||||
struct mass : make_dimension_t<exp<base_dim_mass, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<mass>> : downcast_to<mass> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Mass = Quantity<T> && std::Same<typename T::dimension, dimension_mass>;
|
||||
concept bool Mass = Quantity<T> && std::Same<typename T::dimension, mass>;
|
||||
|
||||
struct gram : unit<dimension_mass, ratio<1, 1000>> {};
|
||||
struct gram : unit<mass, ratio<1, 1000>> {};
|
||||
template<> struct downcasting_traits<downcast_from<gram>> : downcast_to<gram> {};
|
||||
|
||||
struct kilogram : kilo<gram> {};
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_power : make_dimension_t<exp<base_dim_mass, 1>, exp<base_dim_length, 2>, exp<base_dim_time, -3>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_power>> : downcast_to<dimension_power> {};
|
||||
struct power : make_dimension_t<exp<base_dim_mass, 1>, exp<base_dim_length, 2>, exp<base_dim_time, -3>> {};
|
||||
template<> struct downcasting_traits<downcast_from<power>> : downcast_to<power> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Power = Quantity<T> && std::Same<typename T::dimension, dimension_power>;
|
||||
concept bool Power = Quantity<T> && std::Same<typename T::dimension, power>;
|
||||
|
||||
struct watt : derived_unit<dimension_power, kilogram, metre, second> {};
|
||||
struct watt : derived_unit<power, kilogram, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<watt>> : downcast_to<watt> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_pressure : make_dimension_t<exp<base_dim_mass, 1>, exp<base_dim_length, -1>, exp<base_dim_time, -2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_pressure>> : downcast_to<dimension_pressure> {};
|
||||
struct pressure : make_dimension_t<exp<base_dim_mass, 1>, exp<base_dim_length, -1>, exp<base_dim_time, -2>> {};
|
||||
template<> struct downcasting_traits<downcast_from<pressure>> : downcast_to<pressure> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Pressure = Quantity<T> && std::Same<typename T::dimension, dimension_pressure>;
|
||||
concept bool Pressure = Quantity<T> && std::Same<typename T::dimension, pressure>;
|
||||
|
||||
struct pascal : derived_unit<dimension_pressure, kilogram, metre, second> {};
|
||||
struct pascal : derived_unit<pressure, kilogram, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<pascal>> : downcast_to<pascal> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_substance : make_dimension_t<exp<base_dim_substance, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_substance>> : downcast_to<dimension_substance> {};
|
||||
struct substance : make_dimension_t<exp<base_dim_substance, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<substance>> : downcast_to<substance> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Substance = Quantity<T> && std::Same<typename T::dimension, dimension_substance>;
|
||||
concept bool Substance = Quantity<T> && std::Same<typename T::dimension, substance>;
|
||||
|
||||
struct mole : unit<dimension_substance> {};
|
||||
struct mole : unit<substance> {};
|
||||
template<> struct downcasting_traits<downcast_from<mole>> : downcast_to<mole> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_temperature : make_dimension_t<exp<base_dim_temperature, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_temperature>> : downcast_to<dimension_temperature> {};
|
||||
struct temperature : make_dimension_t<exp<base_dim_temperature, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<temperature>> : downcast_to<temperature> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool ThermodynamicTemperature = Quantity<T> && std::Same<typename T::dimension, dimension_temperature>;
|
||||
concept bool ThermodynamicTemperature = Quantity<T> && std::Same<typename T::dimension, temperature>;
|
||||
|
||||
struct kelvin : unit<dimension_temperature> {};
|
||||
struct kelvin : unit<temperature> {};
|
||||
template<> struct downcasting_traits<downcast_from<kelvin>> : downcast_to<kelvin> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_time : make_dimension_t<exp<base_dim_time, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_time>> : downcast_to<dimension_time> {};
|
||||
struct time : make_dimension_t<exp<base_dim_time, 1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<time>> : downcast_to<time> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Time = Quantity<T> && std::Same<typename T::dimension, dimension_time>;
|
||||
concept bool Time = Quantity<T> && std::Same<typename T::dimension, time>;
|
||||
|
||||
struct second : unit<dimension_time> {};
|
||||
struct second : unit<time> {};
|
||||
template<> struct downcasting_traits<downcast_from<second>> : downcast_to<second> {};
|
||||
|
||||
struct nanosecond : nano<second> {};
|
||||
@@ -45,10 +45,10 @@ namespace std::experimental::units {
|
||||
struct millisecond : milli<second> {};
|
||||
template<> struct downcasting_traits<downcast_from<millisecond>> : downcast_to<millisecond> {};
|
||||
|
||||
struct minute : unit<dimension_time, ratio<60>> {};
|
||||
struct minute : unit<time, ratio<60>> {};
|
||||
template<> struct downcasting_traits<downcast_from<minute>> : downcast_to<minute> {};
|
||||
|
||||
struct hour : unit<dimension_time, ratio<3600>> {};
|
||||
struct hour : unit<time, ratio<3600>> {};
|
||||
template<> struct downcasting_traits<downcast_from<hour>> : downcast_to<hour> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -27,19 +27,19 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_velocity : make_dimension_t<exp<base_dim_length, 1>, exp<base_dim_time, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_velocity>> : downcast_to<dimension_velocity> {};
|
||||
struct velocity : make_dimension_t<exp<base_dim_length, 1>, exp<base_dim_time, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<velocity>> : downcast_to<velocity> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Velocity = Quantity<T> && std::Same<typename T::dimension, dimension_velocity>;
|
||||
concept bool Velocity = Quantity<T> && std::Same<typename T::dimension, velocity>;
|
||||
|
||||
struct metre_per_second : derived_unit<dimension_velocity, metre, second> {};
|
||||
struct metre_per_second : derived_unit<velocity, metre, second> {};
|
||||
template<> struct downcasting_traits<downcast_from<metre_per_second>> : downcast_to<metre_per_second> {};
|
||||
|
||||
struct kilometre_per_hour : derived_unit<dimension_velocity, kilometre, hour> {};
|
||||
struct kilometre_per_hour : derived_unit<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> {};
|
||||
struct mile_per_hour : derived_unit<velocity, mile, hour> {};
|
||||
template<> struct downcasting_traits<downcast_from<mile_per_hour>> : downcast_to<mile_per_hour> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_voltage : make_dimension_t<exp<base_dim_mass, 1>, exp<base_dim_length, 2>, exp<base_dim_time, -3>, exp<base_dim_current, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_voltage>> : downcast_to<dimension_voltage> {};
|
||||
struct voltage : make_dimension_t<exp<base_dim_mass, 1>, exp<base_dim_length, 2>, exp<base_dim_time, -3>, exp<base_dim_current, -1>> {};
|
||||
template<> struct downcasting_traits<downcast_from<voltage>> : downcast_to<voltage> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Voltage = Quantity<T> && std::Same<typename T::dimension, dimension_voltage>;
|
||||
concept bool Voltage = Quantity<T> && std::Same<typename T::dimension, voltage>;
|
||||
|
||||
struct volt : derived_unit<dimension_voltage, kilogram, metre, second, ampere> {};
|
||||
struct volt : derived_unit<voltage, kilogram, metre, second, ampere> {};
|
||||
template<> struct downcasting_traits<downcast_from<volt>> : downcast_to<volt> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -26,25 +26,25 @@
|
||||
|
||||
namespace std::experimental::units {
|
||||
|
||||
struct dimension_volume : make_dimension_t<exp<base_dim_length, 3>> {};
|
||||
template<> struct downcasting_traits<downcast_from<dimension_volume>> : downcast_to<dimension_volume> {};
|
||||
struct volume : make_dimension_t<exp<base_dim_length, 3>> {};
|
||||
template<> struct downcasting_traits<downcast_from<volume>> : downcast_to<volume> {};
|
||||
|
||||
template<typename T>
|
||||
concept bool Volume = Quantity<T> && std::Same<typename T::dimension, dimension_volume>;
|
||||
concept bool Volume = Quantity<T> && std::Same<typename T::dimension, volume>;
|
||||
|
||||
struct cubic_millimetre : derived_unit<dimension_volume, millimetre> {};
|
||||
struct cubic_millimetre : derived_unit<volume, millimetre> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_millimetre>> : downcast_to<cubic_millimetre> {};
|
||||
|
||||
struct cubic_centimetre : derived_unit<dimension_volume, centimetre> {};
|
||||
struct cubic_centimetre : derived_unit<volume, centimetre> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_centimetre>> : downcast_to<cubic_centimetre> {};
|
||||
|
||||
struct cubic_metre : derived_unit<dimension_volume, metre> {};
|
||||
struct cubic_metre : derived_unit<volume, metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_metre>> : downcast_to<cubic_metre> {};
|
||||
|
||||
struct cubic_kilometre : derived_unit<dimension_volume, kilometre, metre> {};
|
||||
struct cubic_kilometre : derived_unit<volume, kilometre, metre> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_kilometre>> : downcast_to<cubic_kilometre> {};
|
||||
|
||||
struct cubic_foot : derived_unit<dimension_volume, foot> {};
|
||||
struct cubic_foot : derived_unit<volume, foot> {};
|
||||
template<> struct downcasting_traits<downcast_from<cubic_foot>> : downcast_to<cubic_foot> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
Reference in new issue
Block a user