Physical units put in the physical namespace (I am sorry)
This commit is contained in:
1 parent
771a9a1551
commit
7e935a4108
117 files changed
+352
-349
No files matched your search
@@ -30,13 +30,13 @@
|
||||
namespace units::data {
|
||||
|
||||
struct bit_per_second : unit<bit_per_second> {};
|
||||
struct dim_bitrate : derived_dimension<dim_bitrate, bit_per_second, exp<dim_information, 1>, exp<si::dim_time, -1>> {};
|
||||
struct dim_bitrate : derived_dimension<dim_bitrate, bit_per_second, exp<dim_information, 1>, exp<physical::si::dim_time, -1>> {};
|
||||
|
||||
struct kibibit_per_second : deduced_unit<kibibit_per_second, dim_bitrate, kibibit, si::second> {};
|
||||
struct mebibit_per_second : deduced_unit<mebibit_per_second, dim_bitrate, mebibit, si::second> {};
|
||||
struct gibibit_per_second : deduced_unit<gibibit_per_second, dim_bitrate, gibibit, si::second> {};
|
||||
struct tebibit_per_second : deduced_unit<tebibit_per_second, dim_bitrate, tebibit, si::second> {};
|
||||
struct pebibit_per_second : deduced_unit<pebibit_per_second, dim_bitrate, pebibit, si::second> {};
|
||||
struct kibibit_per_second : deduced_unit<kibibit_per_second, dim_bitrate, kibibit, physical::si::second> {};
|
||||
struct mebibit_per_second : deduced_unit<mebibit_per_second, dim_bitrate, mebibit, physical::si::second> {};
|
||||
struct gibibit_per_second : deduced_unit<gibibit_per_second, dim_bitrate, gibibit, physical::si::second> {};
|
||||
struct tebibit_per_second : deduced_unit<tebibit_per_second, dim_bitrate, tebibit, physical::si::second> {};
|
||||
struct pebibit_per_second : deduced_unit<pebibit_per_second, dim_bitrate, pebibit, physical::si::second> {};
|
||||
|
||||
template<typename T>
|
||||
concept Bitrate = QuantityOf<T, dim_bitrate>;
|
||||
|
||||
@@ -35,4 +35,4 @@ struct tebi : units::prefix<tebi, prefix, "Ti", ratio< 1'099'511'627'776>
|
||||
struct pebi : units::prefix<pebi, prefix, "Pi", ratio< 1'125'899'906'842'624>> {};
|
||||
struct exbi : units::prefix<exbi, prefix, "Ei", ratio<1'152'921'504'606'846'976>> {};
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::data
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/cgs/velocity.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::cgs {
|
||||
namespace units::physical::cgs {
|
||||
|
||||
struct gal : named_unit<gal, "Gal", si::prefix> {};
|
||||
struct dim_acceleration : physical::dim_acceleration<dim_acceleration, gal, dim_length, dim_time> {};
|
||||
@@ -42,4 +42,4 @@ constexpr auto operator"" q_Gal(long double l) { return acceleration<gal, long d
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::cgs
|
||||
} // namespace units::physical::cgs
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/area.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::cgs {
|
||||
namespace units::physical::cgs {
|
||||
|
||||
using si::square_centimetre;
|
||||
|
||||
@@ -44,4 +44,4 @@ constexpr auto operator"" q_cm2(long double l) { return area<square_centimetre,
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::cgs
|
||||
} // namespace units::physical::cgs
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::cgs {
|
||||
namespace units::physical::cgs {
|
||||
|
||||
struct erg : named_unit<erg, "erg", si::prefix> {};
|
||||
|
||||
@@ -44,4 +44,4 @@ constexpr auto operator"" q_erg(long double l) { return energy<erg, long double>
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::cgs
|
||||
} // namespace units::physical::cgs
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::cgs {
|
||||
namespace units::physical::cgs {
|
||||
|
||||
struct dyne : named_unit<dyne, "dyn", si::prefix> {};
|
||||
|
||||
@@ -45,4 +45,4 @@ constexpr auto operator"" q_dyn(long double l) { return force<dyne, long double>
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::cgs
|
||||
} // namespace units::physical::cgs
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/length.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::cgs {
|
||||
namespace units::physical::cgs {
|
||||
|
||||
using si::centimetre;
|
||||
|
||||
@@ -43,4 +43,4 @@ constexpr auto operator"" q_cm(long double l) { return length<centimetre, long d
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::cgs
|
||||
} // namespace units::physical::cgs
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/mass.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::cgs {
|
||||
namespace units::physical::cgs {
|
||||
|
||||
using si::gram;
|
||||
|
||||
@@ -43,4 +43,4 @@ constexpr auto operator"" q_g(long double l) { return mass<gram, long double>(l)
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::cgs
|
||||
} // namespace units::physical::cgs
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::cgs {
|
||||
namespace units::physical::cgs {
|
||||
|
||||
struct erg_per_second : unit<erg_per_second> {};
|
||||
|
||||
@@ -44,4 +44,4 @@ constexpr auto operator"" q_erg_per_s(long double l) { return power<erg_per_seco
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::cgs
|
||||
} // namespace units::physical::cgs
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::cgs {
|
||||
namespace units::physical::cgs {
|
||||
|
||||
struct barye : named_unit<barye, "Ba", si::prefix> {};
|
||||
|
||||
@@ -45,4 +45,4 @@ constexpr auto operator"" q_Ba(long double l) { return pressure<barye, long doub
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::cgs
|
||||
} // namespace units::physical::cgs
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/time.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::cgs {
|
||||
namespace units::physical::cgs {
|
||||
|
||||
using si::second;
|
||||
|
||||
@@ -39,4 +39,4 @@ using si::literals::operator"" q_s;
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::cgs
|
||||
} // namespace units::physical::cgs
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/cgs/time.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::cgs {
|
||||
namespace units::physical::cgs {
|
||||
|
||||
struct centimetre_per_second : unit<centimetre_per_second> {};
|
||||
struct dim_velocity : physical::dim_velocity<dim_velocity, centimetre_per_second, dim_length, dim_time> {};
|
||||
@@ -43,4 +43,4 @@ constexpr auto operator"" q_cm_per_s(long double l) { return velocity<centimetre
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::cgs
|
||||
} // namespace units::physical::cgs
|
||||
@@ -27,9 +27,7 @@
|
||||
#include <units/quantity.h>
|
||||
#include <units/unit.h>
|
||||
|
||||
namespace units {
|
||||
|
||||
namespace physical {
|
||||
namespace units::physical {
|
||||
|
||||
template<typename Dim, template<typename...> typename DimTemplate>
|
||||
concept DimensionOf = Dimension<Dim> && is_derived_from_instantiation<Dim, DimTemplate>;
|
||||
@@ -178,140 +176,138 @@ struct dim_permeability : derived_dimension<Child, U, exp<H, 1>, exp<L, -1>> {};
|
||||
template<typename Child, Unit U, DimensionOf<dim_energy> E, DimensionOf<dim_substance> M>
|
||||
struct dim_molar_energy : derived_dimension<Child, U, exp<E, 1>, exp<M, -1>> {};
|
||||
|
||||
} // namespace physical
|
||||
template<typename T>
|
||||
concept Length = QuantityOf<T, dim_length>;
|
||||
|
||||
template<typename T>
|
||||
concept Length = physical::QuantityOf<T, physical::dim_length>;
|
||||
concept Mass = QuantityOf<T, dim_mass>;
|
||||
|
||||
template<typename T>
|
||||
concept Mass = physical::QuantityOf<T, physical::dim_mass>;
|
||||
concept Time = QuantityOf<T, dim_time>;
|
||||
|
||||
template<typename T>
|
||||
concept Time = physical::QuantityOf<T, physical::dim_time>;
|
||||
concept Current = QuantityOf<T, dim_electric_current>;
|
||||
|
||||
template<typename T>
|
||||
concept Current = physical::QuantityOf<T, physical::dim_electric_current>;
|
||||
concept Temperature = QuantityOf<T, dim_thermodynamic_temperature>;
|
||||
|
||||
template<typename T>
|
||||
concept Temperature = physical::QuantityOf<T, physical::dim_thermodynamic_temperature>;
|
||||
concept Substance = QuantityOf<T, dim_substance>;
|
||||
|
||||
template<typename T>
|
||||
concept Substance = physical::QuantityOf<T, physical::dim_substance>;
|
||||
concept LuminousIntensity = QuantityOf<T, dim_luminous_intensity>;
|
||||
|
||||
template<typename T>
|
||||
concept LuminousIntensity = physical::QuantityOf<T, physical::dim_luminous_intensity>;
|
||||
concept Frequency = QuantityOf<T, dim_frequency>;
|
||||
|
||||
template<typename T>
|
||||
concept Frequency = physical::QuantityOf<T, physical::dim_frequency>;
|
||||
concept Area = QuantityOf<T, dim_area>;
|
||||
|
||||
template<typename T>
|
||||
concept Area = physical::QuantityOf<T, physical::dim_area>;
|
||||
concept Volume = QuantityOf<T, dim_volume>;
|
||||
|
||||
template<typename T>
|
||||
concept Volume = physical::QuantityOf<T, physical::dim_volume>;
|
||||
concept Velocity = QuantityOf<T, dim_velocity>;
|
||||
|
||||
template<typename T>
|
||||
concept Velocity = physical::QuantityOf<T, physical::dim_velocity>;
|
||||
concept Acceleration = QuantityOf<T, dim_acceleration>;
|
||||
|
||||
template<typename T>
|
||||
concept Acceleration = physical::QuantityOf<T, physical::dim_acceleration>;
|
||||
concept Force = QuantityOf<T, dim_force>;
|
||||
|
||||
template<typename T>
|
||||
concept Force = physical::QuantityOf<T, physical::dim_force>;
|
||||
concept Momentum = QuantityOf<T, dim_momentum>;
|
||||
|
||||
template<typename T>
|
||||
concept Momentum = physical::QuantityOf<T, physical::dim_momentum>;
|
||||
concept Energy = QuantityOf<T, dim_energy>;
|
||||
|
||||
template<typename T>
|
||||
concept Energy = physical::QuantityOf<T, physical::dim_energy>;
|
||||
concept Density = QuantityOf<T, dim_density>;
|
||||
|
||||
template<typename T>
|
||||
concept Density = physical::QuantityOf<T, physical::dim_density>;
|
||||
concept Power = QuantityOf<T, dim_power>;
|
||||
|
||||
template<typename T>
|
||||
concept Power = physical::QuantityOf<T, physical::dim_power>;
|
||||
concept Voltage = QuantityOf<T, dim_voltage>;
|
||||
|
||||
template<typename T>
|
||||
concept Voltage = physical::QuantityOf<T, physical::dim_voltage>;
|
||||
concept ElectricCharge = QuantityOf<T, dim_electric_charge>;
|
||||
|
||||
template<typename T>
|
||||
concept ElectricCharge = physical::QuantityOf<T, physical::dim_electric_charge>;
|
||||
concept Capacitance = QuantityOf<T, dim_capacitance>;
|
||||
|
||||
template<typename T>
|
||||
concept Capacitance = physical::QuantityOf<T, physical::dim_capacitance>;
|
||||
concept SurfaceTension = QuantityOf<T, dim_surface_tension>;
|
||||
|
||||
template<typename T>
|
||||
concept SurfaceTension = physical::QuantityOf<T, physical::dim_surface_tension>;
|
||||
concept Pressure = QuantityOf<T, dim_pressure>;
|
||||
|
||||
template<typename T>
|
||||
concept Pressure = physical::QuantityOf<T, physical::dim_pressure>;
|
||||
concept MagneticInduction = QuantityOf<T, dim_magnetic_induction>;
|
||||
|
||||
template<typename T>
|
||||
concept MagneticInduction = physical::QuantityOf<T, physical::dim_magnetic_induction>;
|
||||
concept MagneticFlux = QuantityOf<T, dim_magnetic_flux>;
|
||||
|
||||
template<typename T>
|
||||
concept MagneticFlux = physical::QuantityOf<T, physical::dim_magnetic_flux>;
|
||||
concept Inductance = QuantityOf<T, dim_inductance>;
|
||||
|
||||
template<typename T>
|
||||
concept Inductance = physical::QuantityOf<T, physical::dim_inductance>;
|
||||
|
||||
template<typename T>
|
||||
concept Conductance = physical::QuantityOf<T, physical::dim_conductance>;
|
||||
concept Conductance = QuantityOf<T, dim_conductance>;
|
||||
|
||||
// TODO Add when downcasting issue is solved
|
||||
// template<typename T>
|
||||
// concept Radioactivity = physical::QuantityOf<T, physical::dim_radioactivity>;
|
||||
// concept Radioactivity = QuantityOf<T, dim_radioactivity>;
|
||||
|
||||
template<typename T>
|
||||
concept CatalyticActivity = physical::QuantityOf<T, physical::dim_catalytic_activity>;
|
||||
concept CatalyticActivity = QuantityOf<T, dim_catalytic_activity>;
|
||||
|
||||
template<typename T>
|
||||
concept AbsorbedDose = physical::QuantityOf<T, physical::dim_absorbed_dose>;
|
||||
concept AbsorbedDose = QuantityOf<T, dim_absorbed_dose>;
|
||||
|
||||
template<typename T>
|
||||
concept CurrentDensity = physical::QuantityOf<T, physical::dim_current_density>;
|
||||
concept CurrentDensity = QuantityOf<T, dim_current_density>;
|
||||
|
||||
template<typename T>
|
||||
concept Concentration = physical::QuantityOf<T, physical::dim_concentration>;
|
||||
concept Concentration = QuantityOf<T, dim_concentration>;
|
||||
|
||||
template<typename T>
|
||||
concept Luminance = physical::QuantityOf<T, physical::dim_luminance>;
|
||||
concept Luminance = QuantityOf<T, dim_luminance>;
|
||||
|
||||
template<typename T>
|
||||
concept DynamicViscosity = physical::QuantityOf<T, physical::dim_dynamic_viscosity>;
|
||||
concept DynamicViscosity = QuantityOf<T, dim_dynamic_viscosity>;
|
||||
|
||||
template<typename T>
|
||||
concept HeatCapacity = physical::QuantityOf<T, physical::dim_heat_capacity>;
|
||||
concept HeatCapacity = QuantityOf<T, dim_heat_capacity>;
|
||||
|
||||
template<typename T>
|
||||
concept SpecificHeatCapacity = physical::QuantityOf<T, physical::dim_specific_heat_capacity>;
|
||||
concept SpecificHeatCapacity = QuantityOf<T, dim_specific_heat_capacity>;
|
||||
|
||||
template<typename T>
|
||||
concept MolarHeatCapacity = physical::QuantityOf<T, physical::dim_molar_heat_capacity>;
|
||||
concept MolarHeatCapacity = QuantityOf<T, dim_molar_heat_capacity>;
|
||||
|
||||
template<typename T>
|
||||
concept ThermalConductivity = physical::QuantityOf<T, physical::dim_thermal_conductivity>;
|
||||
concept ThermalConductivity = QuantityOf<T, dim_thermal_conductivity>;
|
||||
|
||||
// TODO Add when downcasting issue is solved
|
||||
// template<typename T>
|
||||
// concept EnergyDensity = physical::QuantityOf<T, physical::dim_energy_density>;
|
||||
// concept EnergyDensity = QuantityOf<T, dim_energy_density>;
|
||||
|
||||
template<typename T>
|
||||
concept ElectricFieldStrength = physical::QuantityOf<T, physical::dim_electric_field_strength>;
|
||||
concept ElectricFieldStrength = QuantityOf<T, dim_electric_field_strength>;
|
||||
|
||||
template<typename T>
|
||||
concept ChargeDensity = physical::QuantityOf<T, physical::dim_charge_density>;
|
||||
concept ChargeDensity = QuantityOf<T, dim_charge_density>;
|
||||
|
||||
template<typename T>
|
||||
concept SurfaceChargeDensity = physical::QuantityOf<T, physical::dim_surface_charge_density>;
|
||||
concept SurfaceChargeDensity = QuantityOf<T, dim_surface_charge_density>;
|
||||
|
||||
template<typename T>
|
||||
concept Permittivity = physical::QuantityOf<T, physical::dim_permittivity>;
|
||||
concept Permittivity = QuantityOf<T, dim_permittivity>;
|
||||
|
||||
template<typename T>
|
||||
concept Permeability = physical::QuantityOf<T, physical::dim_permeability>;
|
||||
concept Permeability = QuantityOf<T, dim_permeability>;
|
||||
|
||||
template<typename T>
|
||||
concept MolarEnergy = physical::QuantityOf<T, physical::dim_molar_energy>;
|
||||
concept MolarEnergy = QuantityOf<T, dim_molar_energy>;
|
||||
|
||||
} // namespace units
|
||||
} // namespace units::physical
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <units/physical/si/length.h>
|
||||
|
||||
namespace units::iau {
|
||||
namespace units::physical::iau {
|
||||
|
||||
// https://en.wikipedia.org/wiki/Light-year
|
||||
struct light_year : named_scaled_unit<light_year, "ly", no_prefix, ratio<9460730472580800>, si::metre> {};
|
||||
@@ -49,4 +49,4 @@ constexpr auto operator"" q_angstrom(long double l) { return si::length<angstrom
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::iau
|
||||
} // namespace units::physical::iau
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/physical/international/length.h>
|
||||
|
||||
namespace units::imperial {
|
||||
namespace units::physical::imperial {
|
||||
|
||||
// https://en.wikipedia.org/wiki/Chain_(unit)
|
||||
struct chain : named_scaled_unit<chain, "ch", no_prefix, ratio<22, 1>, international::yard> {};
|
||||
@@ -42,4 +42,4 @@ constexpr auto operator"" q_rd(long double l) { return si::length<rod, long doub
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::imperial
|
||||
} // namespace units::physical::imperial
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/physical/si/area.h>
|
||||
#include <units/physical/international/length.h>
|
||||
|
||||
namespace units::international {
|
||||
namespace units::physical::international {
|
||||
|
||||
struct square_foot : deduced_unit<square_foot, si::dim_area, international::foot> {};
|
||||
|
||||
@@ -37,4 +37,4 @@ constexpr auto operator"" q_ft2(long double l) { return si::area<square_foot, lo
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::international
|
||||
} // namespace units::physical::international
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <units/physical/si/length.h>
|
||||
|
||||
namespace units::international {
|
||||
namespace units::physical::international {
|
||||
|
||||
// international yard
|
||||
// https://en.wikipedia.org/wiki/International_yard_and_pound
|
||||
@@ -94,4 +94,4 @@ constexpr auto operator"" q_mil(long double l) { return si::length<mil, long dou
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::international
|
||||
} // namespace units::physical::international
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/physical/si/velocity.h>
|
||||
#include <units/physical/international/length.h>
|
||||
|
||||
namespace units::international {
|
||||
namespace units::physical::international {
|
||||
|
||||
struct mile_per_hour : deduced_unit<mile_per_hour, si::dim_velocity, international::mile, si::hour> {};
|
||||
|
||||
@@ -37,4 +37,4 @@ constexpr auto operator"" q_mi_per_h(long double l) { return si::velocity<mile_p
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::international
|
||||
} // namespace units::physical::international
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/physical/si/volume.h>
|
||||
#include <units/physical/international/length.h>
|
||||
|
||||
namespace units::international {
|
||||
namespace units::physical::international {
|
||||
|
||||
struct cubic_foot : deduced_unit<cubic_foot, si::dim_volume, international::foot> {};
|
||||
|
||||
@@ -37,4 +37,4 @@ constexpr auto operator"" q_ft3(long double l) { return si::volume<cubic_foot, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::international
|
||||
} // namespace units::physical::international
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
#include <units/physical/natural/dimensions.h>
|
||||
|
||||
namespace units::natural {
|
||||
namespace units::physical::natural {
|
||||
|
||||
template<Scalar Rep = double>
|
||||
inline constexpr auto speed_of_light = velocity<unitless, Rep>(1);
|
||||
|
||||
} // namespace units::natural
|
||||
} // namespace units::physical::natural
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/natural/units.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::natural {
|
||||
namespace units::physical::natural {
|
||||
|
||||
struct dim_length : physical::dim_length<inverted_gigaelectronvolt> {};
|
||||
template<Unit U, Scalar Rep = double>
|
||||
@@ -63,4 +63,4 @@ using energy = quantity<dim_force, U, Rep>;
|
||||
// Typical UDLs will not work here as the same units are reused by many quantities.
|
||||
// Should we define some strange ones (i.e. q_mass_GeV)?
|
||||
|
||||
} // namespace units::natural
|
||||
} // namespace units::physical::natural
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/unit.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
|
||||
namespace units::natural {
|
||||
namespace units::physical::natural {
|
||||
|
||||
struct unitless : named_unit<unitless, "", no_prefix> {};
|
||||
struct electronvolt : named_unit<electronvolt, "eV", si::prefix> {};
|
||||
@@ -38,4 +38,4 @@ struct square_gigaelectronvolt : named_unit<square_gigaelectronvolt, {"GeV²", "
|
||||
// natural units as an isolated island with ev = 1 which simplifies all
|
||||
// the maths a lot?
|
||||
|
||||
} // namespace units::natural
|
||||
} // namespace units::physical::natural
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct gray : named_unit<gray, "Gy", prefix> {};
|
||||
struct yoctogray : prefixed_unit<yoctogray, yocto, gray> {};
|
||||
@@ -145,4 +145,4 @@ constexpr auto operator"" q_YGy(long double l) { return absorbed_dose<yottagray,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/velocity.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct metre_per_second_sq : unit<metre_per_second_sq> {};
|
||||
struct dim_acceleration : physical::dim_acceleration<dim_acceleration, metre_per_second_sq, dim_length, dim_time> {};
|
||||
@@ -42,4 +42,4 @@ constexpr auto operator"" q_m_per_s2(long double l) { return acceleration<metre_
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/length.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct square_metre : unit<square_metre> {};
|
||||
struct dim_area : physical::dim_area<dim_area, square_metre, dim_length> {};
|
||||
@@ -149,4 +149,4 @@ constexpr auto operator"" q_ha(long double l) { return area<hectare, long double
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct farad : named_unit<farad, "F", prefix> {};
|
||||
struct yoctofarad : prefixed_unit<yoctofarad, yocto, farad> {};
|
||||
@@ -145,4 +145,4 @@ constexpr auto operator"" q_YF(long double l) { return capacitance<yottafarad, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct katal : named_unit<katal, "kat", prefix> {};
|
||||
struct yoctokatal : prefixed_unit<yoctokatal, yocto, katal> {};
|
||||
@@ -151,5 +151,5 @@ constexpr auto operator"" q_U(long double l) { return catalytic_activity<enzyme_
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct coulomb_per_metre_cub : unit<coulomb_per_metre_cub> {};
|
||||
struct coulomb_per_metre_sq : unit<coulomb_per_metre_sq> {};
|
||||
@@ -54,4 +54,4 @@ constexpr auto operator"" q_C_per_m2(long double l) { return surface_charge_dens
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/substance.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct mol_per_metre_cub : unit<mol_per_metre_cub> {};
|
||||
struct dim_concentration : physical::dim_concentration<dim_concentration, mol_per_metre_cub, dim_substance, dim_length> {};
|
||||
@@ -43,5 +43,5 @@ constexpr auto operator"" q_mol_per_m3(long double l) { return concentration<mol
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct siemens : named_unit<siemens, "S", prefix> {};
|
||||
struct yoctosiemens : prefixed_unit<yoctosiemens, yocto, siemens> {};
|
||||
@@ -124,5 +124,5 @@ constexpr auto operator"" q_YS(long double l) { return conductance<yottasiemens,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <units/physical/si/temperature.h>
|
||||
#include <units/physical/si/velocity.h>
|
||||
|
||||
namespace units::si::si2019 {
|
||||
namespace units::physical::si::si2019 {
|
||||
|
||||
template<Scalar Rep = double>
|
||||
inline constexpr auto planck_constant = energy<joule, Rep>(6.62607015e-34) * time<second, Rep>(1);
|
||||
@@ -59,4 +59,4 @@ inline constexpr auto hyperfine_structure_transition_frequency = frequency<hertz
|
||||
template<Scalar Rep = double>
|
||||
inline constexpr auto standard_gravity = acceleration<metre_per_second_sq, Rep>(9.80665);
|
||||
|
||||
} // namespace units::si::si2019
|
||||
} // namespace units::physical::si::si2019
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct ampere : named_unit<ampere, "A", prefix> {};
|
||||
struct yoctoampere : prefixed_unit<yoctoampere, yocto, ampere> {};
|
||||
@@ -143,4 +143,4 @@ constexpr auto operator"" q_YA(long double l) { return current<yottaampere, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct ampere_per_metre_sq : unit<ampere_per_metre_sq> {};
|
||||
|
||||
@@ -44,4 +44,4 @@ constexpr auto operator"" q_A_per_m2(long double l) { return current_density<amp
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct kilogram_per_metre_cub : unit<kilogram_per_metre_cub> {};
|
||||
|
||||
@@ -44,4 +44,4 @@ constexpr auto operator"" q_kg_per_m3(long double l) { return density<kilogram_p
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/pressure.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct pascal_second : unit<pascal_second> {};
|
||||
struct dim_dynamic_viscosity : physical::dim_dynamic_viscosity<dim_dynamic_viscosity, pascal_second, dim_pressure, dim_time> {};
|
||||
@@ -43,5 +43,5 @@ constexpr auto operator"" q_Pa_s(long double l) { return dynamic_viscosity<pasca
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/time.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct coulomb : named_unit<coulomb, "C", prefix> {};
|
||||
|
||||
@@ -44,4 +44,4 @@ constexpr auto operator"" q_C(long double l) { return electric_charge<coulomb, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/voltage.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct volt_per_metre : unit<volt_per_metre> {};
|
||||
struct dim_electric_field_strength : physical::dim_electric_field_strength<dim_electric_field_strength, volt_per_metre, dim_voltage, dim_length> {};
|
||||
@@ -42,4 +42,4 @@ constexpr auto operator"" q_V_per_m(long double l) { return electric_field_stren
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct joule : named_unit<joule, "J", prefix> {};
|
||||
struct yoctojoule : prefixed_unit<yoctojoule, yocto, joule> {};
|
||||
@@ -135,4 +135,4 @@ constexpr auto operator"" q_GeV(long double l) { return energy<gigaelectronvolt,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct newton : named_unit<newton, "N", prefix> {};
|
||||
struct yoctonewton : prefixed_unit<yoctonewton, yocto, newton> {};
|
||||
@@ -145,4 +145,4 @@ constexpr auto operator"" q_YN(long double l) { return force<yottanewton, long d
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/time.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct hertz : named_unit<hertz, "Hz", prefix> {};
|
||||
struct yoctohertz : prefixed_unit<yoctohertz, yocto, hertz> {};
|
||||
@@ -123,4 +123,4 @@ constexpr auto operator"" q_YHz(long double l) { return frequency<yottahertz, lo
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <units/physical/si/substance.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct joule_per_kelvin : unit<joule_per_kelvin> {};
|
||||
struct joule_per_kilogram_kelvin : unit<joule_per_kilogram_kelvin> {};
|
||||
@@ -64,5 +64,5 @@ constexpr auto operator"" q_J_per_mol_K(long double l) { return molar_heat_capac
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/current.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct henry : named_unit<henry, "H", prefix> {};
|
||||
|
||||
@@ -125,4 +125,4 @@ constexpr auto operator"" q_YH(long double l) { return inductance<yottahenry, lo
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct metre : named_unit<metre, "m", prefix> {};
|
||||
struct yoctometre : prefixed_unit<yoctometre, yocto, metre> {};
|
||||
@@ -149,4 +149,4 @@ constexpr auto operator"" q_au(long double l) { return length<astronomical_unit,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/luminous_intensity.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct candela_per_metre_sq : unit<candela_per_metre_sq> {};
|
||||
struct dim_luminance : physical::dim_luminance<dim_luminance, candela_per_metre_sq, dim_luminous_intensity, dim_length> {};
|
||||
@@ -43,5 +43,5 @@ constexpr auto operator"" q_cd_per_m2(long double l) { return luminance<candela_
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct candela : named_unit<candela, "cd", prefix> {};
|
||||
struct yoctocandela : prefixed_unit<yoctocandela, yocto, candela> {};
|
||||
@@ -143,4 +143,4 @@ constexpr auto operator"" q_Ycd(long double l) { return luminous_intensity<yotta
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/area.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct weber : named_unit<weber, "Wb", prefix> {};
|
||||
|
||||
@@ -125,4 +125,4 @@ constexpr auto operator"" q_YWb(long double l) { return magnetic_flux<yottaweber
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct tesla : named_unit<tesla, "T", prefix> {};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct gram : named_unit<gram, "g", prefix> {};
|
||||
struct yoctogram : prefixed_unit<yoctogram, yocto, gram> {};
|
||||
@@ -255,4 +255,4 @@ constexpr auto operator"" q_Da(long double l) { return mass<dalton, long double>
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct joule_per_mole : unit<joule_per_mole> {};
|
||||
|
||||
@@ -45,4 +45,4 @@ constexpr auto operator"" q_J_per_mol(long double l) { return molar_energy<joule
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/velocity.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct kilogram_metre_per_second : unit<kilogram_metre_per_second> {};
|
||||
struct dim_momentum : physical::dim_momentum<dim_momentum, kilogram_metre_per_second, dim_mass, dim_velocity> {};
|
||||
@@ -43,4 +43,4 @@ constexpr auto operator"" q_kg_m_per_s(long double l) { return momentum<kilogram
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct henry_per_metre : unit<henry_per_metre> {};
|
||||
|
||||
@@ -44,5 +44,5 @@ constexpr auto operator"" q_H_per_m(long double l) { return permeability<henry_p
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct farad_per_metre : unit<farad_per_metre> {};
|
||||
|
||||
@@ -44,5 +44,5 @@ constexpr auto operator"" q_F_per_m(long double l) { return permittivity<farad_p
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct watt : named_unit<watt, "W", prefix> {};
|
||||
struct yoctowatt : prefixed_unit<yoctowatt, yocto, watt> {};
|
||||
@@ -124,4 +124,4 @@ constexpr auto operator"" q_YW(long double l) { return power<yottawatt, long dou
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/prefix.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct prefix : prefix_family {};
|
||||
|
||||
@@ -51,4 +51,4 @@ struct zetta : units::prefix<zetta, prefix, "Z", ratio<1, 1, 21>>
|
||||
struct yotta : units::prefix<yotta, prefix, "Y", ratio<1, 1, 24>> {};
|
||||
// clang-format on
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct pascal : named_unit<pascal, "Pa", prefix> {};
|
||||
struct yoctopascal : prefixed_unit<yoctopascal, yocto, pascal> {};
|
||||
@@ -145,4 +145,4 @@ constexpr auto operator"" q_YPa(long double l) { return pressure<yottapascal, lo
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct ohm : named_unit<ohm, {"Ω", "ohm"}, prefix> {};
|
||||
struct yoctoohm : prefixed_unit<yoctoohm, yocto, ohm> {};
|
||||
@@ -125,4 +125,4 @@ constexpr auto operator"" q_YR(long double l) { return resistance<yottaohm, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct mole : named_unit<metre, "mol", prefix> {};
|
||||
|
||||
@@ -43,4 +43,4 @@ constexpr auto operator"" q_mol(long double l) { return substance<mole, long dou
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/force.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct newton_per_metre : unit<newton_per_metre> {};
|
||||
|
||||
@@ -43,4 +43,4 @@ inline namespace literals {
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct kelvin : named_unit<kelvin, "K", no_prefix> {};
|
||||
|
||||
@@ -42,4 +42,4 @@ constexpr auto operator"" q_K(long double l) { return temperature<kelvin, long d
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/temperature.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct watt_per_metre_kelvin : unit<watt_per_metre_kelvin> {};
|
||||
|
||||
@@ -44,4 +44,4 @@ constexpr auto operator"" q_W_per_m_K(long double l) { return thermal_conductivi
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct second : named_unit<second, "s", prefix> {};
|
||||
struct yoctosecond : prefixed_unit<yoctosecond, yocto, second> {};
|
||||
@@ -98,4 +98,4 @@ constexpr auto operator"" q_d(long double l) { return time<day, long double>(l);
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <units/physical/si/time.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct metre_per_second : unit<metre_per_second> {};
|
||||
struct dim_velocity : physical::dim_velocity<dim_velocity, metre_per_second, dim_length, dim_time> {};
|
||||
@@ -49,4 +49,4 @@ constexpr auto operator"" q_km_per_h(long double l) { return velocity<kilometre_
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct volt : named_unit<volt, "V", prefix> {};
|
||||
struct yoctovolt : prefixed_unit<yoctovolt, yocto, volt> {};
|
||||
@@ -145,4 +145,4 @@ constexpr auto operator"" q_YV(long double l) { return voltage<yottavolt, long d
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/length.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::si {
|
||||
namespace units::physical::si {
|
||||
|
||||
struct cubic_metre : unit<cubic_metre> {};
|
||||
struct dim_volume : physical::dim_volume<dim_volume, cubic_metre, dim_length> {};
|
||||
@@ -249,4 +249,4 @@ constexpr auto operator"" q_Yl(long double l) { return volume<yottalitre, long d
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::si
|
||||
} // namespace units::physical::si
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <units/physical/si/length.h>
|
||||
|
||||
namespace units::typographic {
|
||||
namespace units::physical::typographic {
|
||||
|
||||
// TODO Conflicts with (https://en.wikipedia.org/wiki/Pica_(typography)), verify correctness of below conversion factors and provide hyperlinks to definitions
|
||||
struct pica_comp : named_scaled_unit<pica_comp, "pica(comp)", no_prefix, ratio<4233333, 1000000, -3>, si::metre> {};
|
||||
@@ -53,4 +53,4 @@ constexpr auto operator"" q_point_prn(long double l) { return si::length<point_p
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::typographic
|
||||
} // namespace units::physical::typographic
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/physical/si/length.h>
|
||||
|
||||
namespace units::us {
|
||||
namespace units::physical::us {
|
||||
|
||||
// https://en.wikipedia.org/wiki/Foot_(unit)#US_survey_foot
|
||||
// https://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors#B6
|
||||
@@ -40,17 +40,17 @@ struct mile : named_scaled_unit<mile, "mi(us)", no_prefix, ratio<5280>, us::foot
|
||||
inline namespace literals {
|
||||
|
||||
// ft
|
||||
constexpr auto operator"" q_ft_us(unsigned long long l) { return si::length<units::us::foot, std::int64_t>(l); }
|
||||
constexpr auto operator"" q_ft_us(long double l) { return si::length<units::us::foot, long double>(l); }
|
||||
constexpr auto operator"" q_ft_us(unsigned long long l) { return si::length<units::physical::us::foot, std::int64_t>(l); }
|
||||
constexpr auto operator"" q_ft_us(long double l) { return si::length<units::physical::us::foot, long double>(l); }
|
||||
|
||||
// fathom
|
||||
constexpr auto operator"" q_fathom_us(unsigned long long l) { return si::length<units::us::fathom, std::int64_t>(l); }
|
||||
constexpr auto operator"" q_fathom_us(long double l) { return si::length<units::us::fathom, long double>(l); }
|
||||
constexpr auto operator"" q_fathom_us(unsigned long long l) { return si::length<units::physical::us::fathom, std::int64_t>(l); }
|
||||
constexpr auto operator"" q_fathom_us(long double l) { return si::length<units::physical::us::fathom, long double>(l); }
|
||||
|
||||
// ft
|
||||
constexpr auto operator"" q_mi_us(unsigned long long l) { return si::length<units::us::mile, std::int64_t>(l); }
|
||||
constexpr auto operator"" q_mi_us(long double l) { return si::length<units::us::mile, long double>(l); }
|
||||
constexpr auto operator"" q_mi_us(unsigned long long l) { return si::length<units::physical::us::mile, std::int64_t>(l); }
|
||||
constexpr auto operator"" q_mi_us(long double l) { return si::length<units::physical::us::mile, long double>(l); }
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::us
|
||||
} // namespace units::physical::us
|
||||
@@ -320,7 +320,7 @@ struct cast_ratio<FromD, FromU, ToD, ToU> {
|
||||
*
|
||||
* This cast gets the target quantity type to cast to. For example:
|
||||
*
|
||||
* auto q1 = units::quantity_cast<units::si::time<units::si::second>>(1q_ms);
|
||||
* auto q1 = units::quantity_cast<units::physical::si::time<units::physical::si::second>>(1q_ms);
|
||||
*
|
||||
* @tparam To a target quantity type to cast to
|
||||
*/
|
||||
@@ -344,7 +344,7 @@ template<Quantity To, typename D, typename U, typename Rep>
|
||||
*
|
||||
* This cast gets only the target dimension to cast to. For example:
|
||||
*
|
||||
* auto q1 = units::quantity_cast<units::si::acceleration>(200q_Gal);
|
||||
* auto q1 = units::quantity_cast<units::physical::si::acceleration>(200q_Gal);
|
||||
*
|
||||
* @tparam ToD a dimension type to use for a target quantity
|
||||
*/
|
||||
@@ -363,7 +363,7 @@ template<Dimension ToD, typename D, typename U, typename Rep>
|
||||
*
|
||||
* This cast gets only the target unit to cast to. For example:
|
||||
*
|
||||
* auto q1 = units::quantity_cast<units::si::second>(1q_ms);
|
||||
* auto q1 = units::quantity_cast<units::physical::si::second>(1q_ms);
|
||||
*
|
||||
* @tparam ToU a unit type to use for a target quantity
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user