forked from mpusz/mp-units
refactor: systems defined in terms of SI moved under si namespace
This commit is contained in:
+3
-3
@@ -23,10 +23,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/cgs/speed.h>
|
||||
#include <units/physical/si/cgs/speed.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::cgs {
|
||||
namespace units::physical::si::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
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::cgs
|
||||
} // namespace units::physical::si::cgs
|
||||
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/cgs/length.h>
|
||||
#include <units/physical/si/cgs/length.h>
|
||||
#include <units/physical/si/area.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::cgs {
|
||||
namespace units::physical::si::cgs {
|
||||
|
||||
using si::square_centimetre;
|
||||
|
||||
@@ -44,4 +44,4 @@ constexpr auto operator"" _q_cm2(long double l) { return area<square_centimetre,
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::physical::cgs
|
||||
} // namespace units::physical::si::cgs
|
||||
+3
-3
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/cgs/force.h>
|
||||
#include <units/physical/si/cgs/force.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::cgs {
|
||||
namespace units::physical::si::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::physical::cgs
|
||||
} // namespace units::physical::si::cgs
|
||||
@@ -23,12 +23,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/cgs/acceleration.h>
|
||||
#include <units/physical/cgs/mass.h>
|
||||
#include <units/physical/si/cgs/acceleration.h>
|
||||
#include <units/physical/si/cgs/mass.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::cgs {
|
||||
namespace units::physical::si::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::physical::cgs
|
||||
} // namespace units::physical::si::cgs
|
||||
+2
-2
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/length.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::cgs {
|
||||
namespace units::physical::si::cgs {
|
||||
|
||||
using si::centimetre;
|
||||
|
||||
@@ -43,4 +43,4 @@ constexpr auto operator"" _q_cm(long double l) { return length<centimetre, long
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::physical::cgs
|
||||
} // namespace units::physical::si::cgs
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/mass.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::cgs {
|
||||
namespace units::physical::si::cgs {
|
||||
|
||||
using si::gram;
|
||||
|
||||
@@ -43,4 +43,4 @@ constexpr auto operator"" _q_g(long double l) { return mass<gram, long double>(l
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::physical::cgs
|
||||
} // namespace units::physical::si::cgs
|
||||
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/cgs/energy.h>
|
||||
#include <units/physical/si/cgs/energy.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::cgs {
|
||||
namespace units::physical::si::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_sec
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::cgs
|
||||
} // namespace units::physical::si::cgs
|
||||
+4
-4
@@ -23,12 +23,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/cgs/area.h>
|
||||
#include <units/physical/cgs/force.h>
|
||||
#include <units/physical/si/cgs/area.h>
|
||||
#include <units/physical/si/cgs/force.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::cgs {
|
||||
namespace units::physical::si::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 dou
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::cgs
|
||||
} // namespace units::physical::si::cgs
|
||||
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/cgs/length.h>
|
||||
#include <units/physical/cgs/time.h>
|
||||
#include <units/physical/si/cgs/length.h>
|
||||
#include <units/physical/si/cgs/time.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::cgs {
|
||||
namespace units::physical::si::cgs {
|
||||
|
||||
struct centimetre_per_second : unit<centimetre_per_second> {};
|
||||
struct dim_speed : physical::dim_speed<dim_speed, centimetre_per_second, dim_length, dim_time> {};
|
||||
@@ -43,4 +43,4 @@ constexpr auto operator"" _q_cm_per_s(long double l) { return speed<centimetre_p
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::cgs
|
||||
} // namespace units::physical::si::cgs
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/time.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::cgs {
|
||||
namespace units::physical::si::cgs {
|
||||
|
||||
using si::second;
|
||||
|
||||
@@ -39,4 +39,4 @@ using si::literals::operator"" _q_s;
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::physical::cgs
|
||||
} // namespace units::physical::si::cgs
|
||||
+3
-3
@@ -23,10 +23,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/fps/speed.h>
|
||||
#include <units/physical/si/fps/speed.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
struct foot_per_second_sq : unit<foot_per_second_sq> {};
|
||||
struct dim_acceleration : physical::dim_acceleration<dim_acceleration, foot_per_second_sq, dim_length, dim_time> {};
|
||||
@@ -42,4 +42,4 @@ constexpr auto operator"" _q_ft_per_s2(long double l) { return acceleration<foot
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/fps/length.h>
|
||||
#include <units/physical/si/fps/length.h>
|
||||
// #include <units/physical/si/area.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
struct square_foot : unit<square_foot> {};
|
||||
struct dim_area : physical::dim_area<dim_area, square_foot, dim_length> {};
|
||||
@@ -44,4 +44,4 @@ constexpr auto operator"" _q_ft2(long double l) { return area<square_foot, long
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
+4
-4
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/fps/mass.h>
|
||||
#include <units/physical/fps/length.h>
|
||||
#include <units/physical/si/fps/mass.h>
|
||||
#include <units/physical/si/fps/length.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
struct pound_per_foot_cub : unit<pound_per_foot_cub> {};
|
||||
|
||||
@@ -43,4 +43,4 @@ constexpr auto operator"" _q_lb_per_ft3(long double l) { return density<pound_pe
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
+3
-3
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/fps/force.h>
|
||||
#include <units/physical/si/fps/force.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
// https://en.wikipedia.org/wiki/Foot-poundal
|
||||
struct foot_poundal : unit<foot_poundal> {};
|
||||
@@ -54,4 +54,4 @@ constexpr auto operator"" _q_ft_lbf(long double l) { return energy<foot_pound_fo
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
@@ -23,12 +23,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/fps/acceleration.h>
|
||||
#include <units/physical/fps/mass.h>
|
||||
#include <units/physical/si/fps/acceleration.h>
|
||||
#include <units/physical/si/fps/mass.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
// https://en.wikipedia.org/wiki/Poundal
|
||||
struct poundal : named_unit<poundal, "pdl", no_prefix> {};
|
||||
@@ -62,4 +62,4 @@ constexpr auto operator"" _q_klbf(long double l) { return force<kilopound_force,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
+2
-2
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/length.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
// https://en.wikipedia.org/wiki/Foot_(unit)
|
||||
struct foot : named_scaled_unit<foot, "ft", no_prefix, ratio(3'048, 1'000, -1), si::metre> {};
|
||||
@@ -95,4 +95,4 @@ constexpr auto operator"" _q_naut_mi(long double l) { return length<nautical_mil
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/mass.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
// https://en.wikipedia.org/wiki/Pound_(mass)
|
||||
struct pound : named_scaled_unit<pound, "lb", no_prefix, ratio(45'359'237, 100'000'000), si::kilogram> {};
|
||||
@@ -93,4 +93,4 @@ constexpr auto operator"" _q_lton(long double l) { return mass<long_ton, long do
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/fps/energy.h>
|
||||
#include <units/physical/si/fps/energy.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
struct foot_poundal_per_second : unit<foot_poundal_per_second> {};
|
||||
|
||||
@@ -57,4 +57,4 @@ constexpr auto operator"" _q_hp(long double l) { return power<horse_power, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
+4
-4
@@ -23,12 +23,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/fps/area.h>
|
||||
#include <units/physical/fps/force.h>
|
||||
#include <units/physical/si/fps/area.h>
|
||||
#include <units/physical/si/fps/force.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
struct poundal_per_foot_sq : unit<poundal_per_foot_sq> {};
|
||||
|
||||
@@ -58,4 +58,4 @@ constexpr auto operator"" _q_kpsi(long double l) { return pressure<kilopound_for
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/fps/length.h>
|
||||
#include <units/physical/fps/time.h>
|
||||
#include <units/physical/si/fps/length.h>
|
||||
#include <units/physical/si/fps/time.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
struct foot_per_second : unit<foot_per_second> {};
|
||||
struct dim_speed : physical::dim_speed<dim_speed, foot_per_second, dim_length, dim_time> {};
|
||||
@@ -56,4 +56,4 @@ constexpr auto operator"" _q_knot(long double l) { return speed<knot, long doubl
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <units/physical/si/time.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
using si::second;
|
||||
using si::minute;
|
||||
@@ -41,4 +41,4 @@ using si::literals::operator"" _q_s;
|
||||
|
||||
}
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
+3
-3
@@ -23,10 +23,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/dimensions.h>
|
||||
#include <units/physical/fps/length.h>
|
||||
#include <units/physical/si/fps/length.h>
|
||||
#include <units/quantity.h>
|
||||
|
||||
namespace units::physical::fps {
|
||||
namespace units::physical::si::fps {
|
||||
|
||||
struct cubic_foot : unit<cubic_foot> {};
|
||||
struct dim_volume : physical::dim_volume<dim_volume, cubic_foot, dim_length> {};
|
||||
@@ -48,4 +48,4 @@ constexpr auto operator"" _q_yd3(long double l) { return volume<cubic_yard, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::fps
|
||||
} // namespace units::physical::si::fps
|
||||
+2
-2
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <units/physical/si/length.h>
|
||||
|
||||
namespace units::physical::iau {
|
||||
namespace units::physical::si::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<angstro
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::iau
|
||||
} // namespace units::physical::si::iau
|
||||
+4
-4
@@ -22,12 +22,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/international/length.h>
|
||||
#include <units/physical/si/international/length.h>
|
||||
|
||||
namespace units::physical::imperial {
|
||||
namespace units::physical::si::imperial {
|
||||
|
||||
// https://en.wikipedia.org/wiki/Chain_(unit)
|
||||
struct chain : named_scaled_unit<chain, "ch", no_prefix, ratio(22, 1), international::yard> {};
|
||||
struct chain : named_scaled_unit<chain, "ch", no_prefix, ratio(22, 1), si::international::yard> {};
|
||||
|
||||
// https://en.wikipedia.org/wiki/Rod_(unit)
|
||||
struct rod : named_scaled_unit<rod, "rd", no_prefix, ratio(1, 4), chain> {};
|
||||
@@ -42,4 +42,4 @@ constexpr auto operator"" _q_rd(long double l) { return si::length<rod, long dou
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::imperial
|
||||
} // namespace units::physical::si::imperial
|
||||
+4
-4
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/area.h>
|
||||
#include <units/physical/international/length.h>
|
||||
#include <units/physical/si/international/length.h>
|
||||
|
||||
namespace units::physical::international {
|
||||
namespace units::physical::si::international {
|
||||
|
||||
struct square_foot : deduced_unit<square_foot, si::dim_area, international::foot> {};
|
||||
struct square_foot : deduced_unit<square_foot, si::dim_area, si::international::foot> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -37,4 +37,4 @@ constexpr auto operator"" _q_ft2(long double l) { return si::area<square_foot, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::international
|
||||
} // namespace units::physical::si::international
|
||||
+6
-6
@@ -25,20 +25,20 @@
|
||||
|
||||
#include <units/physical/si/length.h>
|
||||
|
||||
namespace units::physical::international {
|
||||
namespace units::physical::si::international {
|
||||
|
||||
// international yard
|
||||
// si::international yard
|
||||
// https://en.wikipedia.org/wiki/International_yard_and_pound
|
||||
struct yard : named_scaled_unit<yard, "yd", no_prefix, ratio(9'144, 1'000, -1), si::metre> {};
|
||||
|
||||
// international foot
|
||||
// si::international foot
|
||||
// https://en.wikipedia.org/wiki/Foot_(unit)#International_foot
|
||||
struct foot : named_scaled_unit<foot, "ft", no_prefix, ratio(1, 3), yard> {};
|
||||
|
||||
// https://en.wikipedia.org/wiki/Fathom#International_fathom
|
||||
struct fathom : named_scaled_unit<fathom, "fathom", no_prefix, ratio(2), yard> {};
|
||||
|
||||
// international inch
|
||||
// si::international inch
|
||||
// https://en.wikipedia.org/wiki/Inch#Equivalences
|
||||
struct inch : named_scaled_unit<inch, "in", no_prefix, ratio(1, 36), yard> {};
|
||||
|
||||
@@ -46,7 +46,7 @@ struct inch : named_scaled_unit<inch, "in", no_prefix, ratio(1, 36), yard> {};
|
||||
// https://en.wikipedia.org/wiki/Mile#International_mile
|
||||
struct mile : named_scaled_unit<mile, "mi", no_prefix, ratio(25'146, 15'625), si::kilometre> {};
|
||||
|
||||
// international nautical mile
|
||||
// si::international nautical mile
|
||||
// https://en.wikipedia.org/wiki/Nautical_mile
|
||||
struct nautical_mile : named_scaled_unit<nautical_mile, "mi(naut)", no_prefix, ratio(1852), si::metre> {};
|
||||
|
||||
@@ -94,4 +94,4 @@ constexpr auto operator"" _q_mil(long double l) { return si::length<mil, long do
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::international
|
||||
} // namespace units::physical::si::international
|
||||
+4
-4
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/speed.h>
|
||||
#include <units/physical/international/length.h>
|
||||
#include <units/physical/si/international/length.h>
|
||||
|
||||
namespace units::physical::international {
|
||||
namespace units::physical::si::international {
|
||||
|
||||
struct mile_per_hour : deduced_unit<mile_per_hour, si::dim_speed, international::mile, si::hour> {};
|
||||
struct mile_per_hour : deduced_unit<mile_per_hour, si::dim_speed, si::international::mile, si::hour> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -37,4 +37,4 @@ constexpr auto operator"" _q_mi_per_h(long double l) { return si::speed<mile_per
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::international
|
||||
} // namespace units::physical::si::international
|
||||
+4
-4
@@ -23,11 +23,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/physical/si/volume.h>
|
||||
#include <units/physical/international/length.h>
|
||||
#include <units/physical/si/international/length.h>
|
||||
|
||||
namespace units::physical::international {
|
||||
namespace units::physical::si::international {
|
||||
|
||||
struct cubic_foot : deduced_unit<cubic_foot, si::dim_volume, international::foot> {};
|
||||
struct cubic_foot : deduced_unit<cubic_foot, si::dim_volume, si::international::foot> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
@@ -37,4 +37,4 @@ constexpr auto operator"" _q_ft3(long double l) { return si::volume<cubic_foot,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::international
|
||||
} // namespace units::physical::si::international
|
||||
+2
-2
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <units/physical/si/length.h>
|
||||
|
||||
namespace units::physical::typographic {
|
||||
namespace units::physical::si::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_
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::typographic
|
||||
} // namespace units::physical::si::typographic
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <units/physical/si/length.h>
|
||||
|
||||
namespace units::physical::us {
|
||||
namespace units::physical::si::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
|
||||
@@ -35,22 +35,22 @@ struct fathom : named_scaled_unit<fathom, "fathom(us)", no_prefix, ratio(6), foo
|
||||
|
||||
// https://en.wikipedia.org/wiki/Mile#U.S._survey_mile
|
||||
// https://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors#B6
|
||||
struct mile : named_scaled_unit<mile, "mi(us)", no_prefix, ratio(5280), us::foot> {};
|
||||
struct mile : named_scaled_unit<mile, "mi(us)", no_prefix, ratio(5280), foot> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ft
|
||||
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); }
|
||||
constexpr auto operator"" _q_ft_us(unsigned long long l) { return si::length<units::physical::si::us::foot, std::int64_t>(l); }
|
||||
constexpr auto operator"" _q_ft_us(long double l) { return si::length<units::physical::si::us::foot, long double>(l); }
|
||||
|
||||
// fathom
|
||||
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); }
|
||||
constexpr auto operator"" _q_fathom_us(unsigned long long l) { return si::length<units::physical::si::us::fathom, std::int64_t>(l); }
|
||||
constexpr auto operator"" _q_fathom_us(long double l) { return si::length<units::physical::si::us::fathom, long double>(l); }
|
||||
|
||||
// ft
|
||||
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); }
|
||||
constexpr auto operator"" _q_mi_us(unsigned long long l) { return si::length<units::physical::si::us::mile, std::int64_t>(l); }
|
||||
constexpr auto operator"" _q_mi_us(long double l) { return si::length<units::physical::si::us::mile, long double>(l); }
|
||||
|
||||
} // namespace literals
|
||||
|
||||
} // namespace units::physical::us
|
||||
} // namespace units::physical::si::us
|
||||
Reference in New Issue
Block a user