mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-29 18:07:16 +02:00
refactor: rename unit_constants to references
Addresses https://github.com/mpusz/units/pull/261#discussion_r596663522.
This commit is contained in:
committed by
Mateusz Pusz
parent
1068f7d182
commit
018c5837f9
@ -26,7 +26,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace units::isq::si::unit_constants;
|
||||
using namespace units::isq::si::references;
|
||||
inline constexpr auto earth_radius = 6371 * km;
|
||||
|
||||
} // namespace
|
||||
|
@ -31,7 +31,7 @@ using namespace glide_computer;
|
||||
|
||||
auto get_gliders()
|
||||
{
|
||||
using namespace si::unit_constants;
|
||||
using namespace si::references;
|
||||
UNITS_DIAGNOSTIC_PUSH
|
||||
UNITS_DIAGNOSTIC_IGNORE_MISSING_BRACES
|
||||
static const std::array gliders = {
|
||||
@ -45,7 +45,7 @@ UNITS_DIAGNOSTIC_POP
|
||||
|
||||
auto get_weather_conditions()
|
||||
{
|
||||
using namespace si::unit_constants;
|
||||
using namespace si::references;
|
||||
static const std::array weather_conditions = {
|
||||
std::pair("Good", weather{height(1900 * m), rate_of_climb(4.3 * m / s)}),
|
||||
std::pair("Medium", weather{height(1550 * m), rate_of_climb(2.8 * m / s)}),
|
||||
@ -56,7 +56,7 @@ auto get_weather_conditions()
|
||||
auto get_waypoints()
|
||||
{
|
||||
using namespace geographic::literals;
|
||||
using namespace units::isq::si::international::unit_constants;
|
||||
using namespace units::isq::si::international::references;
|
||||
static const std::array waypoints = {
|
||||
waypoint{"EPPR", {54.24772_N, 18.6745_E}, altitude(16 * ft)}, // N54°14'51.8" E18°40'28.2"
|
||||
waypoint{"EPGI", {53.52442_N, 18.84947_E}, altitude(115 * ft)} // N53°31'27.9" E18°50'58.1"
|
||||
@ -140,7 +140,7 @@ void print(const aircraft_tow& tow)
|
||||
|
||||
void example()
|
||||
{
|
||||
using namespace si::unit_constants;
|
||||
using namespace si::references;
|
||||
|
||||
const safety sfty = {height(300 * m)};
|
||||
const auto gliders = get_gliders();
|
||||
|
@ -36,7 +36,7 @@ constexpr Speed auto avg_speed(Length auto d, Time auto t)
|
||||
int main()
|
||||
{
|
||||
using namespace units::isq::si::literals;
|
||||
using namespace units::isq::si::unit_constants;
|
||||
using namespace units::isq::si::references;
|
||||
|
||||
constexpr Speed auto v1 = 110 * km / h;
|
||||
constexpr Speed auto v2 = avg_speed(220_q_km, 2_q_h);
|
||||
|
@ -46,10 +46,10 @@ constexpr auto operator"" _q_rad(long double l) { return angle<radian, long doub
|
||||
|
||||
} // namespace literals
|
||||
|
||||
inline namespace unit_constants {
|
||||
inline namespace references {
|
||||
|
||||
inline constexpr auto rad = reference<dim_angle<>, radian>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units
|
||||
|
@ -58,7 +58,7 @@ using reference_divide = detail::reference_divide_impl<
|
||||
* This type is intended to be used in the unit constants definition:
|
||||
*
|
||||
* @code{.cpp}
|
||||
* namespace unit_constants {
|
||||
* namespace references {
|
||||
*
|
||||
* inline constexpr auto m = reference<dim_length, metre>{};
|
||||
* inline constexpr auto km = reference<dim_length, kilometre>{};
|
||||
@ -69,7 +69,7 @@ using reference_divide = detail::reference_divide_impl<
|
||||
* Unit constants simplify quantity creation:
|
||||
*
|
||||
* @code{.cpp}
|
||||
* using namespace units::isq::si::unit_constants;
|
||||
* using namespace units::isq::si::references;
|
||||
*
|
||||
* auto d = 123 * m;
|
||||
* auto v = 70 * km / h;
|
||||
|
@ -56,7 +56,7 @@ constexpr auto operator"" _q_Pib_per_s(unsigned long long l) { gsl_ExpectsAudit(
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto b_per_s = reference<dim_bitrate, bit_per_second>{};
|
||||
inline constexpr auto Kib_per_s = reference<dim_bitrate, kibibit_per_second>{};
|
||||
@ -65,6 +65,6 @@ inline constexpr auto Gib_per_s = reference<dim_bitrate, gibibit_per_second>{};
|
||||
inline constexpr auto Tib_per_s = reference<dim_bitrate, tebibit_per_second>{};
|
||||
inline constexpr auto Pib_per_s = reference<dim_bitrate, pebibit_per_second>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::data
|
||||
|
@ -72,7 +72,7 @@ constexpr auto operator"" _q_PiB(unsigned long long l) { gsl_ExpectsAudit(std::i
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto b = reference<dim_information, bit>{};
|
||||
inline constexpr auto Kib = reference<dim_information, kibibit>{};
|
||||
@ -88,6 +88,6 @@ inline constexpr auto GiB = reference<dim_information, gibibyte>{};
|
||||
inline constexpr auto TiB = reference<dim_information, tebibyte>{};
|
||||
inline constexpr auto PiB = reference<dim_information, pebibyte>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::data
|
||||
|
@ -42,10 +42,10 @@ constexpr auto operator"" _q_Gal(long double l) { return acceleration<gal, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Gal = reference<dim_acceleration, gal>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::cgs
|
||||
|
@ -43,10 +43,10 @@ constexpr auto operator"" _q_cm2(long double l) { return area<square_centimetre,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto cm2 = reference<dim_area, square_centimetre>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::cgs
|
||||
|
@ -44,10 +44,10 @@ constexpr auto operator"" _q_erg(long double l) { return energy<erg, long double
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto erg = reference<dim_energy, cgs::erg>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::cgs
|
||||
|
@ -45,10 +45,10 @@ constexpr auto operator"" _q_dyn(long double l) { return force<dyne, long double
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto dyn = reference<dim_force, dyne>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::cgs
|
||||
|
@ -42,10 +42,10 @@ constexpr auto operator"" _q_cm(long double l) { return length<centimetre, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto cm = reference<dim_length, centimetre>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::cgs
|
||||
|
@ -42,10 +42,10 @@ constexpr auto operator"" _q_g(long double l) { return mass<gram, long double>(l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto g = reference<dim_mass, gram>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::cgs
|
||||
|
@ -45,10 +45,10 @@ constexpr auto operator"" _q_Ba(long double l) { return pressure<barye, long dou
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Ba = reference<dim_pressure, barye>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::cgs
|
||||
|
@ -38,10 +38,10 @@ using si::literals::operator"" _q_s;
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
using si::unit_constants::s;
|
||||
using si::references::s;
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::cgs
|
||||
|
@ -43,10 +43,10 @@ constexpr auto operator"" _q_ft2(long double l) { return area<square_foot, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft2 = reference<dim_area, square_foot>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@ -55,11 +55,11 @@ constexpr auto operator"" _q_ft_lbf(long double l) { return energy<foot_pound_fo
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft_pdl = reference<dim_energy, foot_poundal>{};
|
||||
inline constexpr auto ft_lbf = reference<dim_energy, foot_pound_force>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@ -62,12 +62,12 @@ constexpr auto operator"" _q_klbf(long double l) { return force<kilopound_force,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto pdl = reference<dim_force, poundal>{};
|
||||
inline constexpr auto lbf = reference<dim_force, pound_force>{};
|
||||
inline constexpr auto klbf = reference<dim_force, kilopound_force>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@ -93,7 +93,7 @@ constexpr auto operator"" _q_naut_mi(long double l) { return length<nautical_mil
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto thou = reference<dim_length, thousandth>{};
|
||||
inline constexpr auto mil = thou;
|
||||
@ -106,6 +106,6 @@ inline constexpr auto kyd = reference<dim_length, kiloyard>{};
|
||||
inline constexpr auto mile = reference<dim_length, fps::mile>{};
|
||||
inline constexpr auto naut_mi = reference<dim_length, nautical_mile>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@ -91,7 +91,7 @@ constexpr auto operator"" _q_lton(long double l) { return mass<long_ton, long do
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto gr = reference<dim_mass, grain>{};
|
||||
inline constexpr auto dr = reference<dim_mass, dram>{};
|
||||
@ -103,6 +103,6 @@ inline constexpr auto cwt = reference<dim_mass, hundredweight>{};
|
||||
inline constexpr auto ston = reference<dim_mass, short_ton>{};
|
||||
inline constexpr auto lton = reference<dim_mass, long_ton>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@ -56,10 +56,10 @@ constexpr auto operator"" _q_hp(long double l) { return power<horse_power, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto hp = reference<dim_power, horse_power>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@ -59,11 +59,11 @@ constexpr auto operator"" _q_kpsi(long double l) { return pressure<kilopound_for
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto psi = reference<dim_pressure, pound_force_per_inch_sq>{};
|
||||
inline constexpr auto kpsi = reference<dim_pressure, kilopound_force_per_inch_sq>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@ -58,11 +58,11 @@ constexpr auto operator"" _q_knot(long double l) { return speed<knot, long doubl
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto mph = reference<dim_speed, mile_per_hour>{};
|
||||
inline constexpr auto knot = reference<dim_speed, fps::knot>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@ -40,10 +40,10 @@ using si::literals::operator"" _q_s;
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
using si::unit_constants::s;
|
||||
using si::references::s;
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@ -48,11 +48,11 @@ constexpr auto operator"" _q_yd3(long double l) { return volume<cubic_yard, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft3 = reference<dim_volume, cubic_foot>{};
|
||||
inline constexpr auto yd3 = reference<dim_volume, cubic_yard>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@ -52,12 +52,12 @@ constexpr auto operator"" _q_angstrom(long double l) { return si::length<angstro
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ly = reference<si::dim_length, light_year>{};
|
||||
inline constexpr auto pc = reference<si::dim_length, parsec>{};
|
||||
inline constexpr auto angstrom = reference<si::dim_length, iau::angstrom>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::iau
|
||||
|
@ -44,11 +44,11 @@ constexpr auto operator"" _q_rd(long double l) { return si::length<rod, long dou
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ch = reference<si::dim_length, chain>{};
|
||||
inline constexpr auto rd = reference<si::dim_length, rod>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::imperial
|
||||
|
@ -37,10 +37,10 @@ constexpr auto operator"" _q_ft2(long double l) { return si::area<square_foot, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft2 = reference<si::dim_area, square_foot>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::international
|
||||
|
@ -94,7 +94,7 @@ constexpr auto operator"" _q_mil(long double l) { return si::length<mil, long do
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto yd = reference<si::dim_length, yard>{};
|
||||
inline constexpr auto ft = reference<si::dim_length, foot>{};
|
||||
@ -105,6 +105,6 @@ inline constexpr auto mi_naut = reference<si::dim_length, nautical_mile>{};
|
||||
inline constexpr auto thou = reference<si::dim_length, international::thou>{};
|
||||
inline constexpr auto mil = reference<si::dim_length, international::mil>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::international
|
||||
|
@ -37,10 +37,10 @@ constexpr auto operator"" _q_ft3(long double l) { return si::volume<cubic_foot,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft3 = reference<si::dim_volume, cubic_foot>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::international
|
||||
|
@ -53,13 +53,13 @@ constexpr auto operator"" _q_point_prn(long double l) { return si::length<point_
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto pica_comp = reference<si::dim_length, typographic::pica_comp>{};
|
||||
inline constexpr auto pica_prn = reference<si::dim_length, typographic::pica_prn>{};
|
||||
inline constexpr auto point_comp = reference<si::dim_length, typographic::point_comp>{};
|
||||
inline constexpr auto point_prn = reference<si::dim_length, typographic::point_prn>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::typographic
|
||||
|
@ -53,12 +53,12 @@ constexpr auto operator"" _q_mi_us(long double l) { return si::length<units::isq
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft = reference<si::dim_length, us::foot>{};
|
||||
inline constexpr auto fathom = reference<si::dim_length, us::fathom>{};
|
||||
inline constexpr auto mi = reference<si::dim_length, us::mile>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si::us
|
||||
|
@ -144,7 +144,7 @@ constexpr auto operator"" _q_YGy(long double l) { return absorbed_dose<yottagray
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Gy = reference<dim_absorbed_dose, gray>{};
|
||||
inline constexpr auto yGy = reference<dim_absorbed_dose, yoctogray>{};
|
||||
@ -168,6 +168,6 @@ inline constexpr auto EGy = reference<dim_absorbed_dose, exagray>{};
|
||||
inline constexpr auto ZGy = reference<dim_absorbed_dose, zettagray>{};
|
||||
inline constexpr auto YGy = reference<dim_absorbed_dose, yottagray>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -44,10 +44,10 @@ constexpr auto operator"" _q_mol(long double l) { return amount_of_substance<mol
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto mol = reference<dim_amount_of_substance, mole>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -149,7 +149,7 @@ constexpr auto operator"" _q_ha(long double l) { return area<hectare, long doubl
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto m2 = reference<dim_area, square_metre>{};
|
||||
inline constexpr auto ym2 = reference<dim_area, square_yoctometre>{};
|
||||
@ -174,6 +174,6 @@ inline constexpr auto Zm2 = reference<dim_area, square_zettametre>{};
|
||||
inline constexpr auto Ym2 = reference<dim_area, square_yottametre>{};
|
||||
inline constexpr auto ha = reference<dim_area, hectare>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -145,7 +145,7 @@ constexpr auto operator"" _q_YF(long double l) { return capacitance<yottafarad,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto F = reference<dim_capacitance, farad>{};
|
||||
inline constexpr auto yF = reference<dim_capacitance, yoctofarad>{};
|
||||
@ -169,6 +169,6 @@ inline constexpr auto EF = reference<dim_capacitance, exafarad>{};
|
||||
inline constexpr auto ZF = reference<dim_capacitance, zettafarad>{};
|
||||
inline constexpr auto YF = reference<dim_capacitance, yottafarad>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -151,7 +151,7 @@ constexpr auto operator"" _q_U(long double l) { return catalytic_activity<enzyme
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto kat = reference<dim_catalytic_activity, katal>{};
|
||||
inline constexpr auto ykat = reference<dim_catalytic_activity, yoctokatal>{};
|
||||
@ -176,7 +176,7 @@ inline constexpr auto Zkat = reference<dim_catalytic_activity, zettakatal>{};
|
||||
inline constexpr auto Ykat = reference<dim_catalytic_activity, yottakatal>{};
|
||||
inline constexpr auto U = reference<dim_catalytic_activity, enzyme_unit>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
||||
|
@ -124,7 +124,7 @@ constexpr auto operator"" _q_YS(long double l) { return conductance<yottasiemens
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto S = reference<dim_conductance, siemens>{};
|
||||
inline constexpr auto yS = reference<dim_conductance, yoctosiemens>{};
|
||||
@ -144,7 +144,7 @@ inline constexpr auto ES = reference<dim_conductance, exasiemens>{};
|
||||
inline constexpr auto ZS = reference<dim_conductance, zettasiemens>{};
|
||||
inline constexpr auto YS = reference<dim_conductance, yottasiemens>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
||||
|
@ -43,11 +43,11 @@ constexpr auto operator"" _q_Pa_s(long double l) { return dynamic_viscosity<pasc
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Pa_s = reference<dim_dynamic_viscosity, pascal_second>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
||||
|
@ -44,10 +44,10 @@ constexpr auto operator"" _q_C(long double l) { return electric_charge<coulomb,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto C = reference<dim_electric_charge, coulomb>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -144,7 +144,7 @@ constexpr auto operator"" _q_YA(long double l) { return electric_current<yottaam
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto A = reference<dim_electric_current, ampere>{};
|
||||
inline constexpr auto yA = reference<dim_electric_current, yoctoampere>{};
|
||||
@ -168,6 +168,6 @@ inline constexpr auto EA = reference<dim_electric_current, exaampere>{};
|
||||
inline constexpr auto ZA = reference<dim_electric_current, zettaampere>{};
|
||||
inline constexpr auto YA = reference<dim_electric_current, yottaampere>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -135,7 +135,7 @@ constexpr auto operator"" _q_GeV(long double l) { return energy<gigaelectronvolt
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto J = reference<dim_energy, joule>{};
|
||||
inline constexpr auto yJ = reference<dim_energy, yoctojoule>{};
|
||||
@ -157,6 +157,6 @@ inline constexpr auto YJ = reference<dim_energy, yottajoule>{};
|
||||
inline constexpr auto eV = reference<dim_energy, electronvolt>{};
|
||||
inline constexpr auto GeV = reference<dim_energy, gigaelectronvolt>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -145,7 +145,7 @@ constexpr auto operator"" _q_YN(long double l) { return force<yottanewton, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto N = reference<dim_force, newton>{};
|
||||
inline constexpr auto yN = reference<dim_force, yoctonewton>{};
|
||||
@ -169,6 +169,6 @@ inline constexpr auto EN = reference<dim_force, exanewton>{};
|
||||
inline constexpr auto ZN = reference<dim_force, zettanewton>{};
|
||||
inline constexpr auto YN = reference<dim_force, yottanewton>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -123,7 +123,7 @@ constexpr auto operator"" _q_YHz(long double l) { return frequency<yottahertz, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Hz = reference<dim_frequency, hertz>{};
|
||||
inline constexpr auto yHz = reference<dim_frequency, yoctohertz>{};
|
||||
@ -143,6 +143,6 @@ inline constexpr auto EHz = reference<dim_frequency, exahertz>{};
|
||||
inline constexpr auto ZHz = reference<dim_frequency, zettahertz>{};
|
||||
inline constexpr auto YHz = reference<dim_frequency, yottahertz>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -125,7 +125,7 @@ constexpr auto operator"" _q_YH(long double l) { return inductance<yottahenry, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto H = reference<dim_inductance, henry>{};
|
||||
inline constexpr auto yH = reference<dim_inductance, yoctohenry>{};
|
||||
@ -145,6 +145,6 @@ inline constexpr auto EH = reference<dim_inductance, exahenry>{};
|
||||
inline constexpr auto ZH = reference<dim_inductance, zettahenry>{};
|
||||
inline constexpr auto YH = reference<dim_inductance, yottahenry>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -150,7 +150,7 @@ constexpr auto operator"" _q_au(long double l) { return length<astronomical_unit
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto m = reference<dim_length, metre>{};
|
||||
inline constexpr auto ym = reference<dim_length, yoctometre>{};
|
||||
@ -175,6 +175,6 @@ inline constexpr auto Zm = reference<dim_length, zettametre>{};
|
||||
inline constexpr auto Ym = reference<dim_length, yottametre>{};
|
||||
inline constexpr auto au = reference<dim_length, astronomical_unit>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -144,7 +144,7 @@ constexpr auto operator"" _q_Ycd(long double l) { return luminous_intensity<yott
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto cd = reference<dim_luminous_intensity, candela>{};
|
||||
inline constexpr auto ycd = reference<dim_luminous_intensity, yoctocandela>{};
|
||||
@ -168,6 +168,6 @@ inline constexpr auto Ecd = reference<dim_luminous_intensity, exacandela>{};
|
||||
inline constexpr auto Zcd = reference<dim_luminous_intensity, zettacandela>{};
|
||||
inline constexpr auto Ycd = reference<dim_luminous_intensity, yottacandela>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -125,7 +125,7 @@ constexpr auto operator"" _q_YWb(long double l) { return magnetic_flux<yottawebe
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Wb = reference<dim_magnetic_flux, weber>{};
|
||||
inline constexpr auto yWb = reference<dim_magnetic_flux, yoctoweber>{};
|
||||
@ -145,6 +145,6 @@ inline constexpr auto EWb = reference<dim_magnetic_flux, exaweber>{};
|
||||
inline constexpr auto ZWb = reference<dim_magnetic_flux, zettaweber>{};
|
||||
inline constexpr auto YWb = reference<dim_magnetic_flux, yottaweber>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -133,7 +133,7 @@ constexpr auto operator"" _q_G(long double l) { return magnetic_induction<gauss,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto T = reference<dim_magnetic_induction, tesla>{};
|
||||
inline constexpr auto yT = reference<dim_magnetic_induction, yoctotesla>{};
|
||||
@ -154,6 +154,6 @@ inline constexpr auto ZT = reference<dim_magnetic_induction, zettatesla>{};
|
||||
inline constexpr auto YT = reference<dim_magnetic_induction, yottatesla>{};
|
||||
inline constexpr auto G = reference<dim_magnetic_induction, gauss>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units
|
||||
|
@ -256,7 +256,7 @@ constexpr auto operator"" _q_Da(long double l) { return mass<dalton, long double
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto g = reference<dim_mass, gram>{};
|
||||
inline constexpr auto yg = reference<dim_mass, yoctogram>{};
|
||||
@ -302,6 +302,6 @@ inline constexpr auto Zt = reference<dim_mass, zettatonne>{};
|
||||
inline constexpr auto Yt = reference<dim_mass, yottatonne>{};
|
||||
inline constexpr auto Da = reference<dim_mass, dalton>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -124,7 +124,7 @@ constexpr auto operator"" _q_YW(long double l) { return power<yottawatt, long do
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto W = reference<dim_power, watt>{};
|
||||
inline constexpr auto yW = reference<dim_power, yoctowatt>{};
|
||||
@ -144,6 +144,6 @@ inline constexpr auto EW = reference<dim_power, exawatt>{};
|
||||
inline constexpr auto ZW = reference<dim_power, zettawatt>{};
|
||||
inline constexpr auto YW = reference<dim_power, yottawatt>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -145,7 +145,7 @@ constexpr auto operator"" _q_YPa(long double l) { return pressure<yottapascal, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Pa = reference<dim_pressure, pascal>{};
|
||||
inline constexpr auto yPa = reference<dim_pressure, yoctopascal>{};
|
||||
@ -169,6 +169,6 @@ inline constexpr auto EPa = reference<dim_pressure, exapascal>{};
|
||||
inline constexpr auto ZPa = reference<dim_pressure, zettapascal>{};
|
||||
inline constexpr auto YPa = reference<dim_pressure, yottapascal>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -143,7 +143,7 @@ constexpr auto operator"" _q_YBq(long double l) { return radioactivity<yottabecq
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Bq = reference<dim_radioactivity, becquerel>{};
|
||||
inline constexpr auto yBq = reference<dim_radioactivity, yoctobecquerel>{};
|
||||
@ -167,6 +167,6 @@ inline constexpr auto EBq = reference<dim_radioactivity, exabecquerel>{};
|
||||
inline constexpr auto ZBq = reference<dim_radioactivity, zettabecquerel>{};
|
||||
inline constexpr auto YBq = reference<dim_radioactivity, yottabecquerel>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -125,7 +125,7 @@ constexpr auto operator"" _q_YR(long double l) { return resistance<yottaohm, lon
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto R = reference<dim_resistance, ohm>{};
|
||||
inline constexpr auto yR = reference<dim_resistance, yoctoohm>{};
|
||||
@ -145,6 +145,6 @@ inline constexpr auto ER = reference<dim_resistance, exaohm>{};
|
||||
inline constexpr auto ZR = reference<dim_resistance, zettaohm>{};
|
||||
inline constexpr auto YR = reference<dim_resistance, yottaohm>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -43,10 +43,10 @@ constexpr auto operator"" _q_K(long double l) { return thermodynamic_temperature
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto K = reference<dim_thermodynamic_temperature, kelvin>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -99,7 +99,7 @@ constexpr auto operator"" _q_d(long double l) { return time<day, long double>(l)
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ys = reference<dim_time, yoctosecond>{};
|
||||
inline constexpr auto zs = reference<dim_time, zeptosecond>{};
|
||||
@ -114,6 +114,6 @@ inline constexpr auto min = reference<dim_time, minute>{};
|
||||
inline constexpr auto h = reference<dim_time, hour>{};
|
||||
inline constexpr auto d = reference<dim_time, day>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -45,10 +45,10 @@ constexpr auto operator"" _q_Nm_per_rad(long double l) { return torque<newton_me
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Nm_per_rad = reference<dim_torque, newton_metre_per_radian>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -145,7 +145,7 @@ constexpr auto operator"" _q_YV(long double l) { return voltage<yottavolt, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto V = reference<dim_voltage, volt>{};
|
||||
inline constexpr auto yV = reference<dim_voltage, yoctovolt>{};
|
||||
@ -169,6 +169,6 @@ inline constexpr auto EV = reference<dim_voltage, exavolt>{};
|
||||
inline constexpr auto ZV = reference<dim_voltage, zettavolt>{};
|
||||
inline constexpr auto YV = reference<dim_voltage, yottavolt>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -249,7 +249,7 @@ constexpr auto operator"" _q_Yl(long double l) { return volume<yottalitre, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto m3 = reference<dim_volume, cubic_metre>{};
|
||||
inline constexpr auto ym3 = reference<dim_volume, cubic_yoctometre>{};
|
||||
@ -294,6 +294,6 @@ inline constexpr auto El = reference<dim_volume, exalitre>{};
|
||||
inline constexpr auto Zl = reference<dim_volume, zettalitre>{};
|
||||
inline constexpr auto Yl = reference<dim_volume, yottalitre>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
} // namespace references
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@ -38,9 +38,9 @@ namespace {
|
||||
using namespace units;
|
||||
namespace si = isq::si;
|
||||
using namespace si;
|
||||
using namespace unit_constants;
|
||||
using namespace references;
|
||||
|
||||
constexpr auto cgs_cm = cgs::unit_constants::cm;
|
||||
constexpr auto cgs_cm = cgs::references::cm;
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
@ -38,10 +38,10 @@ namespace {
|
||||
using namespace units;
|
||||
namespace si = isq::si;
|
||||
using namespace si;
|
||||
using namespace unit_constants;
|
||||
using namespace references;
|
||||
using sys_seconds = std::chrono::time_point<std::chrono::system_clock, std::chrono::seconds>;
|
||||
|
||||
constexpr auto cgs_cm = cgs::unit_constants::cm;
|
||||
constexpr auto cgs_cm = cgs::references::cm;
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
@ -34,7 +34,7 @@ namespace {
|
||||
|
||||
using namespace units;
|
||||
using namespace isq::si;
|
||||
using namespace unit_constants;
|
||||
using namespace references;
|
||||
using namespace std::chrono_literals;
|
||||
using sys_seconds = std::chrono::time_point<std::chrono::system_clock, std::chrono::seconds>;
|
||||
|
||||
|
@ -40,9 +40,9 @@ namespace {
|
||||
using namespace units;
|
||||
namespace si = isq::si;
|
||||
using namespace si;
|
||||
using namespace unit_constants;
|
||||
using namespace references;
|
||||
|
||||
constexpr auto cgs_cm = cgs::unit_constants::cm;
|
||||
constexpr auto cgs_cm = cgs::references::cm;
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
|
@ -39,7 +39,7 @@
|
||||
using namespace units;
|
||||
using namespace units::isq;
|
||||
using namespace units::isq::si;
|
||||
using namespace units::isq::si::unit_constants;
|
||||
using namespace units::isq::si::references;
|
||||
|
||||
static_assert(2 * m == 2_q_m);
|
||||
static_assert(2 * s == 2_q_s);
|
||||
|
Reference in New Issue
Block a user