mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 20:54:28 +02:00
build: Added an option to disable UDLs support
Now it is time to get rid of UDLs from tests and examples and then disable them by default.
This commit is contained in:
@@ -41,10 +41,12 @@ class UnitsConan(ConanFile):
|
||||
"gsl-lite/0.37.0"
|
||||
)
|
||||
options = {
|
||||
"udls": [True, False],
|
||||
"downcast_mode": ["off", "on", "auto"],
|
||||
"build_docs": [True, False]
|
||||
}
|
||||
default_options = {
|
||||
"udls": True,
|
||||
"downcast_mode": "on",
|
||||
"build_docs": True
|
||||
}
|
||||
@@ -116,6 +118,7 @@ class UnitsConan(ConanFile):
|
||||
|
||||
def generate(self):
|
||||
tc = CMakeToolchain(self)
|
||||
tc.variables["UNITS_UDLS"] = self.options.udls
|
||||
tc.variables["UNITS_DOWNCAST_MODE"] = str(self.options.downcast_mode).upper()
|
||||
# if self._run_tests: # TODO Enable this when environment is supported in the Conan toolchain
|
||||
tc.variables["UNITS_BUILD_DOCS"] = self.options.build_docs
|
||||
|
@@ -123,6 +123,15 @@ It also runs unit tests during Conan build.
|
||||
Conan Options
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
udls
|
||||
++++
|
||||
|
||||
**Values**: ``True``/``False``
|
||||
|
||||
**Defaulted to**: ``True``
|
||||
|
||||
Determines if library should provide User Defined Literals (UDLs) for quantities of various units.
|
||||
|
||||
downcast_mode
|
||||
+++++++++++++
|
||||
|
||||
@@ -149,6 +158,16 @@ Additionally, enables project documentation generation when the project is being
|
||||
CMake Options
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
UNITS_UDLS
|
||||
+++++++++++++++++++
|
||||
|
||||
**Values**: ``ON``/``OFF``
|
||||
|
||||
**Defaulted to**: ``ON``
|
||||
|
||||
Equivalent to `udls`_.
|
||||
|
||||
|
||||
UNITS_DOWNCAST_MODE
|
||||
+++++++++++++++++++
|
||||
|
||||
|
@@ -27,15 +27,20 @@ project(mp-units
|
||||
)
|
||||
|
||||
option(UNITS_AS_SYSTEM_HEADERS "Exports library as system headers" OFF)
|
||||
if(UNITS_AS_SYSTEM_HEADERS)
|
||||
set(units_as_system SYSTEM)
|
||||
endif()
|
||||
option(UNITS_UDLS "Enables definitions of User Defined Literals (UDLs) provided for quantities of various units" ON)
|
||||
|
||||
message(STATUS "UNITS_AS_SYSTEM_HEADERS: ${UNITS_AS_SYSTEM_HEADERS}")
|
||||
message(STATUS "UNITS_UDLS: ${UNITS_UDLS}")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
include(AddUnitsModule)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(UNITS_AS_SYSTEM_HEADERS)
|
||||
set(units_as_system SYSTEM)
|
||||
endif()
|
||||
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(core-fmt)
|
||||
add_subdirectory(core-io)
|
||||
|
@@ -38,3 +38,14 @@ function(add_units_module name)
|
||||
install(TARGETS mp-units-${name} EXPORT mp-unitsTargets)
|
||||
install(DIRECTORY include/units TYPE INCLUDE)
|
||||
endfunction()
|
||||
|
||||
|
||||
#
|
||||
# add_units_systems(ModuleName <depependencies>...)
|
||||
#
|
||||
function(add_units_system name)
|
||||
add_units_module(${name} ${ARGN})
|
||||
if(UNITS_UDLS)
|
||||
target_compile_definitions(mp-units-${name} INTERFACE UNITS_UDLS=1)
|
||||
endif()
|
||||
endfunction()
|
||||
|
@@ -55,6 +55,10 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
)
|
||||
endif()
|
||||
|
||||
if(UNITS_UDLS)
|
||||
target_compile_definitions(mp-units-core INTERFACE UNITS_UDLS=1)
|
||||
endif()
|
||||
|
||||
if(DEFINED UNITS_DOWNCAST_MODE)
|
||||
set(downcast_mode_options OFF ON AUTO)
|
||||
list(FIND downcast_mode_options "${UNITS_DOWNCAST_MODE}" downcast_mode)
|
||||
|
@@ -43,6 +43,8 @@ concept Angle = QuantityOfT<T, dim_angle>;
|
||||
template<UnitOf<dim_angle<>> U, Representation Rep = double>
|
||||
using angle = quantity<dim_angle<>, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// rad
|
||||
@@ -51,6 +53,8 @@ constexpr auto operator"" _q_rad(long double l) { return angle<radian, long doub
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto rad = reference<dim_angle<>, radian>{};
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_units_module(isq-iec80000 mp-units::si)
|
||||
add_units_system(isq-iec80000 mp-units::si)
|
||||
|
@@ -50,6 +50,8 @@ using dim_modulation_rate = si::dim_frequency;
|
||||
template<UnitOf<dim_modulation_rate> U, Representation Rep = double>
|
||||
using modulation_rate = quantity<dim_modulation_rate, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
constexpr auto operator"" _q_Bd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return modulation_rate<baud, std::int64_t>(static_cast<std::int64_t>(l)); }
|
||||
@@ -64,6 +66,8 @@ constexpr auto operator"" _q_YBd(unsigned long long l) { gsl_ExpectsAudit(std::i
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Bd = reference<dim_modulation_rate, baud>{};
|
||||
|
@@ -79,6 +79,8 @@ concept StorageCapacity = QuantityOf<T, dim_storage_capacity>;
|
||||
template<UnitOf<dim_storage_capacity> U, Representation Rep = double>
|
||||
using storage_capacity = quantity<dim_storage_capacity, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// bits
|
||||
@@ -121,6 +123,8 @@ constexpr auto operator"" _q_PiB(unsigned long long l) { gsl_ExpectsAudit(std::i
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
// bits
|
||||
|
@@ -43,12 +43,16 @@ concept TrafficIntensity = QuantityOf<T, dim_traffic_intensity>;
|
||||
template<UnitOf<dim_traffic_intensity> U, Representation Rep = double>
|
||||
using traffic_intensity = quantity<dim_traffic_intensity, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
constexpr auto operator"" _q_E(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return traffic_intensity<erlang, std::int64_t>(static_cast<std::int64_t>(l)); }
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto E = reference<dim_traffic_intensity, erlang>{};
|
||||
|
@@ -52,6 +52,8 @@ concept TransferRate = QuantityOf<T, dim_transfer_rate>;
|
||||
template<UnitOf<dim_transfer_rate> U, Representation Rep = double>
|
||||
using transfer_rate = quantity<dim_transfer_rate, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
constexpr auto operator"" _q_B_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return transfer_rate<byte_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
|
||||
@@ -66,4 +68,6 @@ constexpr auto operator"" _q_YB_per_s(unsigned long long l) { gsl_ExpectsAudit(s
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::iec80000
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_units_module(isq-natural mp-units::isq)
|
||||
add_units_system(isq-natural mp-units::isq)
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_units_module(si-cgs mp-units::si)
|
||||
add_units_system(si-cgs mp-units::si)
|
||||
|
@@ -40,6 +40,8 @@ struct dim_acceleration : isq::dim_acceleration<dim_acceleration, gal, dim_lengt
|
||||
template<UnitOf<dim_acceleration> U, Representation Rep = double>
|
||||
using acceleration = quantity<dim_acceleration, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Gal
|
||||
@@ -48,6 +50,8 @@ constexpr auto operator"" _q_Gal(long double l) { return acceleration<gal, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Gal = reference<dim_acceleration, gal>{};
|
||||
|
@@ -42,6 +42,8 @@ struct dim_area : isq::dim_area<dim_area, square_centimetre, dim_length> {};
|
||||
template<UnitOf<dim_area> U, Representation Rep = double>
|
||||
using area = quantity<dim_area, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// cm2
|
||||
@@ -50,6 +52,8 @@ constexpr auto operator"" _q_cm2(long double l) { return area<square_centimetre,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto cm2 = reference<dim_area, square_centimetre>{};
|
||||
|
@@ -42,6 +42,8 @@ struct dim_energy : isq::dim_energy<dim_energy, erg, dim_force, dim_length> {};
|
||||
template<UnitOf<dim_energy> U, Representation Rep = double>
|
||||
using energy = quantity<dim_energy, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// erg
|
||||
@@ -50,6 +52,8 @@ constexpr auto operator"" _q_erg(long double l) { return energy<erg, long double
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto erg = reference<dim_energy, cgs::erg>{};
|
||||
|
@@ -43,6 +43,8 @@ struct dim_force : isq::dim_force<dim_force, dyne, dim_mass, dim_acceleration> {
|
||||
template<UnitOf<dim_force> U, Representation Rep = double>
|
||||
using force = quantity<dim_force, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// dyn
|
||||
@@ -51,6 +53,8 @@ constexpr auto operator"" _q_dyn(long double l) { return force<dyne, long double
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto dyn = reference<dim_force, dyne>{};
|
||||
|
@@ -41,6 +41,8 @@ struct dim_length : isq::dim_length<centimetre> {};
|
||||
template<UnitOf<dim_length> U, Representation Rep = double>
|
||||
using length = quantity<dim_length, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// cm
|
||||
@@ -49,6 +51,8 @@ constexpr auto operator"" _q_cm(long double l) { return length<centimetre, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto cm = reference<dim_length, centimetre>{};
|
||||
|
@@ -41,6 +41,8 @@ struct dim_mass : isq::dim_mass<gram> {};
|
||||
template<UnitOf<dim_mass> U, Representation Rep = double>
|
||||
using mass = quantity<dim_mass, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// g
|
||||
@@ -49,6 +51,8 @@ constexpr auto operator"" _q_g(long double l) { return mass<gram, long double>(l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto g = reference<dim_mass, gram>{};
|
||||
|
@@ -41,6 +41,8 @@ struct dim_power : isq::dim_power<dim_power, erg_per_second, dim_energy, dim_tim
|
||||
template<UnitOf<dim_power> U, Representation Rep = double>
|
||||
using power = quantity<dim_power, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// erg/s
|
||||
@@ -49,4 +51,6 @@ constexpr auto operator"" _q_erg_per_s(long double l) { return power<erg_per_sec
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si::cgs
|
||||
|
@@ -43,6 +43,8 @@ struct dim_pressure : isq::dim_pressure<dim_pressure, barye, dim_force, dim_area
|
||||
template<UnitOf<dim_pressure> U, Representation Rep = double>
|
||||
using pressure = quantity<dim_pressure, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Ba
|
||||
@@ -51,6 +53,8 @@ constexpr auto operator"" _q_Ba(long double l) { return pressure<barye, long dou
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Ba = reference<dim_pressure, barye>{};
|
||||
|
@@ -40,6 +40,8 @@ struct dim_speed : isq::dim_speed<dim_speed, centimetre_per_second, dim_length,
|
||||
template<UnitOf<dim_speed> U, Representation Rep = double>
|
||||
using speed = quantity<dim_speed, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// cm/s
|
||||
@@ -48,4 +50,6 @@ constexpr auto operator"" _q_cm_per_s(long double l) { return speed<centimetre_p
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si::cgs
|
||||
|
@@ -37,12 +37,16 @@ using si::second;
|
||||
using si::dim_time;
|
||||
using si::time;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
using si::literals::operator"" _q_s;
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
using si::references::s;
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_units_module(si-fps mp-units::si)
|
||||
add_units_system(si-fps mp-units::si)
|
||||
|
@@ -39,6 +39,8 @@ struct dim_acceleration : isq::dim_acceleration<dim_acceleration, foot_per_secon
|
||||
template<UnitOf<dim_acceleration> U, Representation Rep = double>
|
||||
using acceleration = quantity<dim_acceleration, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ft/s2
|
||||
@@ -47,4 +49,6 @@ constexpr auto operator"" _q_ft_per_s2(long double l) { return acceleration<foot
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@@ -41,6 +41,8 @@ struct dim_area : isq::dim_area<dim_area, square_foot, dim_length> {};
|
||||
template<UnitOf<dim_area> U, Representation Rep = double>
|
||||
using area = quantity<dim_area, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ft2
|
||||
@@ -49,6 +51,8 @@ constexpr auto operator"" _q_ft2(long double l) { return area<square_foot, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft2 = reference<dim_area, square_foot>{};
|
||||
|
@@ -41,6 +41,8 @@ struct dim_density : isq::dim_density<dim_density, pound_per_foot_cub, dim_mass,
|
||||
template<UnitOf<dim_density> U, Representation Rep = double>
|
||||
using density = quantity<dim_density, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// lb/ft³
|
||||
@@ -49,4 +51,6 @@ constexpr auto operator"" _q_lb_per_ft3(long double l) { return density<pound_pe
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@@ -45,6 +45,8 @@ struct foot_pound_force : noble_deduced_unit<foot_pound_force, dim_energy, pound
|
||||
template<UnitOf<dim_energy> U, Representation Rep = double>
|
||||
using energy = quantity<dim_energy, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// foot poundal
|
||||
@@ -57,4 +59,6 @@ constexpr auto operator"" _q_ft_lbf(long double l) { return energy<foot_pound_fo
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si::fps
|
||||
|
@@ -52,6 +52,8 @@ struct dim_force : isq::dim_force<dim_force, poundal, dim_mass, dim_acceleration
|
||||
template<UnitOf<dim_force> U, Representation Rep = double>
|
||||
using force = quantity<dim_force, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// poundal
|
||||
@@ -68,6 +70,8 @@ constexpr auto operator"" _q_klbf(long double l) { return force<kilopound_force,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto pdl = reference<dim_force, poundal>{};
|
||||
|
@@ -59,6 +59,8 @@ struct dim_length : isq::dim_length<foot> {};
|
||||
template<UnitOf<dim_length> U, Representation Rep = double>
|
||||
using length = quantity<dim_length, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Thousandth
|
||||
@@ -98,6 +100,8 @@ constexpr auto operator"" _q_naut_mi(long double l) { return length<nautical_mil
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto thou = reference<dim_length, thousandth>{};
|
||||
|
@@ -58,6 +58,8 @@ struct short_ton : named_scaled_unit<short_ton, "ton (short)", no_prefix, ratio(
|
||||
|
||||
struct long_ton : named_scaled_unit<long_ton, "ton (long)", no_prefix, ratio(2'240, 1), pound>{};
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Grain
|
||||
@@ -98,6 +100,8 @@ constexpr auto operator"" _q_lton(long double l) { return mass<long_ton, long do
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto gr = reference<dim_mass, grain>{};
|
||||
|
@@ -46,6 +46,8 @@ struct horse_power : named_scaled_unit<horse_power, "hp", no_prefix, ratio(550),
|
||||
template<UnitOf<dim_power> U, Representation Rep = double>
|
||||
using power = quantity<dim_power, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// foot pound force per second
|
||||
@@ -62,6 +64,8 @@ constexpr auto operator"" _q_hp(long double l) { return power<horse_power, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto hp = reference<dim_power, horse_power>{};
|
||||
|
@@ -49,6 +49,8 @@ struct pound_force_per_inch_sq : named_scaled_unit<pound_force_per_inch_sq, "psi
|
||||
|
||||
struct kilopound_force_per_inch_sq : prefixed_unit<kilopound_force_per_inch_sq, si::kilo, pound_force_per_inch_sq> {};
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Poundal per square foot
|
||||
@@ -65,6 +67,8 @@ constexpr auto operator"" _q_kpsi(long double l) { return pressure<kilopound_for
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto psi = reference<dim_pressure, pound_force_per_inch_sq>{};
|
||||
|
@@ -48,6 +48,8 @@ struct nautical_mile_per_hour : named_deduced_unit<nautical_mile_per_hour, dim_s
|
||||
struct knot : alias_unit<nautical_mile_per_hour, "knot", no_prefix> {};
|
||||
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ft/s
|
||||
@@ -64,6 +66,8 @@ constexpr auto operator"" _q_knot(long double l) { return speed<knot, long doubl
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto mph = reference<dim_speed, mile_per_hour>{};
|
||||
|
@@ -41,12 +41,16 @@ using si::hour;
|
||||
using si::dim_time;
|
||||
using si::time;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
using si::literals::operator"" _q_s;
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
using si::references::s;
|
||||
|
@@ -42,6 +42,8 @@ struct cubic_yard : deduced_unit<cubic_yard, dim_volume, yard> {};
|
||||
template<UnitOf<dim_volume> U, Representation Rep = double>
|
||||
using volume = quantity<dim_volume, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ft3
|
||||
@@ -54,6 +56,8 @@ constexpr auto operator"" _q_yd3(long double l) { return volume<cubic_yard, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft3 = reference<dim_volume, cubic_foot>{};
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_units_module(si-iau mp-units::si)
|
||||
add_units_system(si-iau mp-units::si)
|
||||
|
@@ -44,6 +44,8 @@ struct parsec : named_scaled_unit<parsec, "pc", si::prefix, ratio(30'856'775'814
|
||||
// https://en.wikipedia.org/wiki/Angstrom
|
||||
struct angstrom : named_scaled_unit<angstrom, "angstrom", no_prefix, ratio(1, 1, -10), si::metre> {};
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ly
|
||||
@@ -60,6 +62,8 @@ constexpr auto operator"" _q_angstrom(long double l) { return si::length<angstro
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ly = reference<si::dim_length, light_year>{};
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_units_module(si-imperial mp-units::si)
|
||||
add_units_system(si-imperial mp-units::si)
|
||||
|
@@ -40,6 +40,8 @@ struct chain : named_scaled_unit<chain, "ch", no_prefix, ratio(22, 1), si::inter
|
||||
// https://en.wikipedia.org/wiki/Rod_(unit)
|
||||
struct rod : named_scaled_unit<rod, "rd", no_prefix, ratio(1, 4), chain> {};
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ch
|
||||
@@ -52,6 +54,8 @@ constexpr auto operator"" _q_rd(long double l) { return si::length<rod, long dou
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ch = reference<si::dim_length, chain>{};
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_units_module(si-international mp-units::si)
|
||||
add_units_system(si-international mp-units::si)
|
||||
|
@@ -37,6 +37,8 @@ namespace units::isq::si::international {
|
||||
|
||||
struct square_foot : deduced_unit<square_foot, si::dim_area, si::international::foot> {};
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ft2
|
||||
@@ -45,6 +47,8 @@ constexpr auto operator"" _q_ft2(long double l) { return si::area<square_foot, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft2 = reference<si::dim_area, square_foot>{};
|
||||
|
@@ -66,6 +66,8 @@ struct thou : named_scaled_unit<thou, "thou", no_prefix, ratio(1, 1000), inch> {
|
||||
// https://en.wikipedia.org/wiki/Thousandth_of_an_inch
|
||||
using mil = thou;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// yd
|
||||
@@ -102,6 +104,8 @@ constexpr auto operator"" _q_mil(long double l) { return si::length<mil, long do
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto yd = reference<si::dim_length, yard>{};
|
||||
|
@@ -36,6 +36,8 @@ namespace units::isq::si::international {
|
||||
|
||||
struct mile_per_hour : deduced_unit<mile_per_hour, si::dim_speed, si::international::mile, si::hour> {};
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// mi/h
|
||||
@@ -44,4 +46,6 @@ constexpr auto operator"" _q_mi_per_h(long double l) { return si::speed<mile_per
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si::international
|
||||
|
@@ -37,6 +37,8 @@ namespace units::isq::si::international {
|
||||
|
||||
struct cubic_foot : deduced_unit<cubic_foot, si::dim_volume, si::international::foot> {};
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ft3
|
||||
@@ -45,6 +47,8 @@ constexpr auto operator"" _q_ft3(long double l) { return si::volume<cubic_foot,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft3 = reference<si::dim_volume, cubic_foot>{};
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_units_module(si-typographic mp-units::si)
|
||||
add_units_system(si-typographic mp-units::si)
|
||||
|
@@ -41,6 +41,8 @@ struct pica_prn : named_scaled_unit<pica_prn, "pica(prn)", no_prefix, ratio(2108
|
||||
struct point_comp : named_scaled_unit<point_comp, "point(comp)", no_prefix, ratio(1763889, 500000, -4), si::metre> {};
|
||||
struct point_prn : named_scaled_unit<point_prn, "point(prn)", no_prefix, ratio(1757299, 500000, -4), si::metre> {};
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// pica comp
|
||||
@@ -61,6 +63,8 @@ constexpr auto operator"" _q_point_prn(long double l) { return si::length<point_
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto pica_comp = reference<si::dim_length, typographic::pica_comp>{};
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_units_module(si-us mp-units::si)
|
||||
add_units_system(si-us mp-units::si)
|
||||
|
@@ -45,6 +45,8 @@ struct fathom : named_scaled_unit<fathom, "fathom(us)", no_prefix, ratio(6), foo
|
||||
// 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), foot> {};
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ft
|
||||
@@ -61,6 +63,8 @@ constexpr auto operator"" _q_mi_us(long double l) { return si::length<units::isq
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ft = reference<si::dim_length, us::foot>{};
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
add_units_module(si mp-units::isq)
|
||||
add_units_system(si mp-units::isq)
|
||||
|
@@ -62,6 +62,8 @@ struct dim_absorbed_dose : isq::dim_absorbed_dose<dim_absorbed_dose, gray, dim_e
|
||||
template<UnitOf<dim_absorbed_dose> U, Representation Rep = double>
|
||||
using absorbed_dose = quantity<dim_absorbed_dose, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Gy
|
||||
@@ -150,6 +152,8 @@ constexpr auto operator"" _q_YGy(long double l) { return absorbed_dose<yottagray
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Gy = reference<dim_absorbed_dose, gray>{};
|
||||
|
@@ -39,6 +39,8 @@ struct dim_acceleration : isq::dim_acceleration<dim_acceleration, metre_per_seco
|
||||
template<UnitOf<dim_acceleration> U, Representation Rep = double>
|
||||
using acceleration = quantity<dim_acceleration, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// m/s2
|
||||
@@ -47,4 +49,6 @@ constexpr auto operator"" _q_m_per_s2(long double l) { return acceleration<metre
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -41,6 +41,8 @@ struct dim_amount_of_substance : isq::dim_amount_of_substance<mole> {};
|
||||
template<UnitOf<dim_amount_of_substance> U, Representation Rep = double>
|
||||
using amount_of_substance = quantity<dim_amount_of_substance, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// mol
|
||||
@@ -49,6 +51,8 @@ constexpr auto operator"" _q_mol(long double l) { return amount_of_substance<mol
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto mol = reference<dim_amount_of_substance, mole>{};
|
||||
|
@@ -41,6 +41,8 @@ struct dim_angular_velocity : isq::dim_angular_velocity<dim_angular_velocity, ra
|
||||
template<UnitOf<dim_angular_velocity> U, Representation Rep = double>
|
||||
using angular_velocity = quantity<dim_angular_velocity, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// rad / s
|
||||
@@ -49,4 +51,6 @@ constexpr auto operator"" _q_rad_per_s(long double l) { return angular_velocity<
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -63,6 +63,8 @@ struct hectare : alias_unit<square_hectometre, "ha", no_prefix> {};
|
||||
template<UnitOf<dim_area> U, Representation Rep = double>
|
||||
using area = quantity<dim_area, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// m2
|
||||
@@ -155,6 +157,8 @@ constexpr auto operator"" _q_ha(long double l) { return area<hectare, long doubl
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto m2 = reference<dim_area, square_metre>{};
|
||||
|
@@ -63,6 +63,8 @@ struct dim_capacitance : isq::dim_capacitance<dim_capacitance, farad, dim_electr
|
||||
template<UnitOf<dim_capacitance> U, Representation Rep = double>
|
||||
using capacitance = quantity<dim_capacitance, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// F
|
||||
@@ -151,6 +153,8 @@ constexpr auto operator"" _q_YF(long double l) { return capacitance<yottafarad,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto F = reference<dim_capacitance, farad>{};
|
||||
|
@@ -65,6 +65,8 @@ struct dim_catalytic_activity : isq::dim_catalytic_activity<dim_catalytic_activi
|
||||
template<UnitOf<dim_catalytic_activity> U, Representation Rep = double>
|
||||
using catalytic_activity = quantity<dim_catalytic_activity, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// kat
|
||||
@@ -157,6 +159,8 @@ constexpr auto operator"" _q_U(long double l) { return catalytic_activity<enzyme
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto kat = reference<dim_catalytic_activity, katal>{};
|
||||
|
@@ -47,6 +47,8 @@ using charge_density = quantity<dim_charge_density, U, Rep>;
|
||||
template<UnitOf<dim_surface_charge_density> U, Representation Rep = double>
|
||||
using surface_charge_density = quantity<dim_surface_charge_density, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// C/m³
|
||||
@@ -59,4 +61,6 @@ constexpr auto operator"" _q_C_per_m2(long double l) { return surface_charge_den
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -40,6 +40,8 @@ struct dim_concentration : isq::dim_concentration<dim_concentration, mol_per_met
|
||||
template<UnitOf<dim_concentration> U, Representation Rep = double>
|
||||
using concentration = quantity<dim_concentration, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// mol/m³
|
||||
@@ -48,5 +50,7 @@ constexpr auto operator"" _q_mol_per_m3(long double l) { return concentration<mo
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
||||
|
@@ -58,6 +58,8 @@ struct dim_conductance : isq::dim_conductance<dim_conductance, siemens, dim_resi
|
||||
template<UnitOf<dim_conductance> U, Representation Rep = double>
|
||||
using conductance = quantity<dim_conductance, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// R
|
||||
@@ -130,6 +132,8 @@ constexpr auto operator"" _q_YS(long double l) { return conductance<yottasiemens
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto S = reference<dim_conductance, siemens>{};
|
||||
|
@@ -42,6 +42,8 @@ struct dim_current_density : isq::dim_current_density<dim_current_density, amper
|
||||
template<UnitOf<dim_current_density> U, Representation Rep = double>
|
||||
using current_density = quantity<dim_current_density, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// A / m²
|
||||
@@ -50,4 +52,6 @@ constexpr auto operator"" _q_A_per_m2(long double l) { return current_density<am
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -42,6 +42,8 @@ struct dim_density : isq::dim_density<dim_density, kilogram_per_metre_cub, dim_m
|
||||
template<UnitOf<dim_density> U, Representation Rep = double>
|
||||
using density = quantity<dim_density, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// kg / m³
|
||||
@@ -50,4 +52,6 @@ constexpr auto operator"" _q_kg_per_m3(long double l) { return density<kilogram_
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -40,6 +40,8 @@ struct dim_dynamic_viscosity : isq::dim_dynamic_viscosity<dim_dynamic_viscosity,
|
||||
template<UnitOf<dim_dynamic_viscosity> U, Representation Rep = double>
|
||||
using dynamic_viscosity = quantity<dim_dynamic_viscosity, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Pa·s
|
||||
@@ -48,5 +50,7 @@ constexpr auto operator"" _q_Pa_s(long double l) { return dynamic_viscosity<pasc
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
||||
|
@@ -42,6 +42,8 @@ struct dim_electric_charge : isq::dim_electric_charge<dim_electric_charge, coulo
|
||||
template<UnitOf<dim_electric_charge> U, Representation Rep = double>
|
||||
using electric_charge = quantity<dim_electric_charge, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// C
|
||||
@@ -50,6 +52,8 @@ constexpr auto operator"" _q_C(long double l) { return electric_charge<coulomb,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto C = reference<dim_electric_charge, coulomb>{};
|
||||
|
@@ -61,6 +61,8 @@ struct dim_electric_current : isq::dim_electric_current<ampere> {};
|
||||
template<UnitOf<dim_electric_current> U, Representation Rep = double>
|
||||
using electric_current = quantity<dim_electric_current, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// A
|
||||
@@ -149,6 +151,8 @@ constexpr auto operator"" _q_YA(long double l) { return electric_current<yottaam
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto A = reference<dim_electric_current, ampere>{};
|
||||
|
@@ -39,6 +39,8 @@ struct dim_electric_field_strength : isq::dim_electric_field_strength<dim_electr
|
||||
template<UnitOf<dim_electric_field_strength> U, Representation Rep = double>
|
||||
using electric_field_strength = quantity<dim_electric_field_strength, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// V/m
|
||||
@@ -47,4 +49,6 @@ constexpr auto operator"" _q_V_per_m(long double l) { return electric_field_stre
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -61,6 +61,8 @@ struct dim_energy : isq::dim_energy<dim_energy, joule, dim_force, dim_length> {}
|
||||
template<UnitOf<dim_energy> U, Representation Rep = double>
|
||||
using energy = quantity<dim_energy, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// J
|
||||
@@ -141,6 +143,8 @@ constexpr auto operator"" _q_GeV(long double l) { return energy<gigaelectronvolt
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto J = reference<dim_energy, joule>{};
|
||||
|
@@ -40,6 +40,8 @@ struct dim_energy_density : isq::dim_energy_density<dim_energy_density, joule_pe
|
||||
template<UnitOf<dim_energy_density> U, Representation Rep = double>
|
||||
using energy_density = quantity<dim_energy_density, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// N/m
|
||||
@@ -48,4 +50,6 @@ constexpr auto operator"" _q_J_per_m3(long double l) { return energy_density<jou
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -63,6 +63,8 @@ struct dim_force : isq::dim_force<dim_force, newton, dim_mass, dim_acceleration>
|
||||
template<UnitOf<dim_force> U, Representation Rep = double>
|
||||
using force = quantity<dim_force, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// N
|
||||
@@ -151,6 +153,8 @@ constexpr auto operator"" _q_YN(long double l) { return force<yottanewton, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto N = reference<dim_force, newton>{};
|
||||
|
@@ -57,6 +57,8 @@ struct dim_frequency : isq::dim_frequency<dim_frequency, hertz, dim_time> {};
|
||||
template<UnitOf<dim_frequency> U, Representation Rep = double>
|
||||
using frequency = quantity<dim_frequency, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Hz
|
||||
@@ -129,6 +131,8 @@ constexpr auto operator"" _q_YHz(long double l) { return frequency<yottahertz, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Hz = reference<dim_frequency, hertz>{};
|
||||
|
@@ -53,6 +53,8 @@ using specific_heat_capacity = quantity<dim_specific_heat_capacity, U, Rep>;
|
||||
template<UnitOf<dim_molar_heat_capacity> U, Representation Rep = double>
|
||||
using molar_heat_capacity = quantity<dim_molar_heat_capacity, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// J/K
|
||||
@@ -69,5 +71,7 @@ constexpr auto operator"" _q_J_per_mol_K(long double l) { return molar_heat_capa
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
||||
|
@@ -59,6 +59,8 @@ struct dim_inductance : isq::dim_inductance<dim_inductance, henry, dim_magnetic_
|
||||
template<UnitOf<dim_inductance> U, Representation Rep = double>
|
||||
using inductance = quantity<dim_inductance, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// H
|
||||
@@ -131,6 +133,8 @@ constexpr auto operator"" _q_YH(long double l) { return inductance<yottahenry, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto H = reference<dim_inductance, henry>{};
|
||||
|
@@ -63,6 +63,8 @@ struct dim_length : isq::dim_length<metre> {};
|
||||
template<UnitOf<dim_length> U, Representation Rep = double>
|
||||
using length = quantity<dim_length, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// m
|
||||
@@ -155,6 +157,8 @@ constexpr auto operator"" _q_au(long double l) { return length<astronomical_unit
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto m = reference<dim_length, metre>{};
|
||||
|
@@ -40,6 +40,8 @@ struct dim_luminance : isq::dim_luminance<dim_luminance, candela_per_metre_sq, d
|
||||
template<UnitOf<dim_luminance> U, Representation Rep = double>
|
||||
using luminance = quantity<dim_luminance, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// cd/m²
|
||||
@@ -48,5 +50,7 @@ constexpr auto operator"" _q_cd_per_m2(long double l) { return luminance<candela
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
||||
|
@@ -61,6 +61,8 @@ struct dim_luminous_intensity : isq::dim_luminous_intensity<candela> {};
|
||||
template<UnitOf<dim_luminous_intensity> U, Representation Rep = double>
|
||||
using luminous_intensity = quantity<dim_luminous_intensity, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// cd
|
||||
@@ -149,6 +151,8 @@ constexpr auto operator"" _q_Ycd(long double l) { return luminous_intensity<yott
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto cd = reference<dim_luminous_intensity, candela>{};
|
||||
|
@@ -59,6 +59,8 @@ struct dim_magnetic_flux : isq::dim_magnetic_flux<dim_magnetic_flux, weber, dim_
|
||||
template<UnitOf<dim_magnetic_flux> U, Representation Rep = double>
|
||||
using magnetic_flux = quantity<dim_magnetic_flux, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Wb
|
||||
@@ -131,6 +133,8 @@ constexpr auto operator"" _q_YWb(long double l) { return magnetic_flux<yottawebe
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Wb = reference<dim_magnetic_flux, weber>{};
|
||||
|
@@ -63,6 +63,8 @@ struct dim_magnetic_induction : isq::dim_magnetic_induction<dim_magnetic_inducti
|
||||
template<UnitOf<dim_magnetic_induction> U, Representation Rep = double>
|
||||
using magnetic_induction = quantity<dim_magnetic_induction, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// T
|
||||
@@ -139,6 +141,8 @@ constexpr auto operator"" _q_G(long double l) { return magnetic_induction<gauss,
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto T = reference<dim_magnetic_induction, tesla>{};
|
||||
|
@@ -85,6 +85,8 @@ struct dim_mass : isq::dim_mass<kilogram> {};
|
||||
template<UnitOf<dim_mass> U, Representation Rep = double>
|
||||
using mass = quantity<dim_mass, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// g
|
||||
@@ -261,6 +263,8 @@ constexpr auto operator"" _q_Da(long double l) { return mass<dalton, long double
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto g = reference<dim_mass, gram>{};
|
||||
|
@@ -42,6 +42,8 @@ struct dim_molar_energy : isq::dim_molar_energy<dim_molar_energy, joule_per_mole
|
||||
template<UnitOf<dim_molar_energy> U, Representation Rep = double>
|
||||
using molar_energy = quantity<dim_molar_energy, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// J/mol
|
||||
@@ -50,4 +52,6 @@ constexpr auto operator"" _q_J_per_mol(long double l) { return molar_energy<joul
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -40,6 +40,8 @@ struct dim_momentum : isq::dim_momentum<dim_momentum, kilogram_metre_per_second,
|
||||
template<UnitOf<dim_momentum> U, Representation Rep = double>
|
||||
using momentum = quantity<dim_momentum, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// kg*m/s
|
||||
@@ -48,4 +50,6 @@ constexpr auto operator"" _q_kg_m_per_s(long double l) { return momentum<kilogra
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -41,6 +41,8 @@ struct dim_permeability : isq::dim_permeability<dim_permeability, henry_per_metr
|
||||
template<UnitOf<dim_permeability> U, Representation Rep = double>
|
||||
using permeability = quantity<dim_permeability, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// H/m
|
||||
@@ -49,5 +51,7 @@ constexpr auto operator"" _q_H_per_m(long double l) { return permeability<henry_
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
||||
|
@@ -41,6 +41,8 @@ struct dim_permittivity : isq::dim_permittivity<dim_permittivity, farad_per_metr
|
||||
template<UnitOf<dim_permittivity> U, Representation Rep = double>
|
||||
using permittivity = quantity<dim_permittivity, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// F/m
|
||||
@@ -49,5 +51,7 @@ constexpr auto operator"" _q_F_per_m(long double l) { return permittivity<farad_
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
||||
|
@@ -58,6 +58,8 @@ struct dim_power : isq::dim_power<dim_power, watt, dim_energy, dim_time> {};
|
||||
template<UnitOf<dim_power> U, Representation Rep = double>
|
||||
using power = quantity<dim_power, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// W
|
||||
@@ -130,6 +132,8 @@ constexpr auto operator"" _q_YW(long double l) { return power<yottawatt, long do
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto W = reference<dim_power, watt>{};
|
||||
|
@@ -63,6 +63,8 @@ struct dim_pressure : isq::dim_pressure<dim_pressure, pascal, dim_force, dim_are
|
||||
template<UnitOf<dim_pressure> U, Representation Rep = double>
|
||||
using pressure = quantity<dim_pressure, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Pa
|
||||
@@ -151,6 +153,8 @@ constexpr auto operator"" _q_YPa(long double l) { return pressure<yottapascal, l
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Pa = reference<dim_pressure, pascal>{};
|
||||
|
@@ -61,6 +61,8 @@ struct dim_radioactivity : isq::dim_radioactivity<dim_radioactivity, becquerel,
|
||||
template<UnitOf<dim_radioactivity> U, Representation Rep = double>
|
||||
using radioactivity = quantity<dim_radioactivity, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Bq
|
||||
@@ -149,6 +151,8 @@ constexpr auto operator"" _q_YBq(long double l) { return radioactivity<yottabecq
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto Bq = reference<dim_radioactivity, becquerel>{};
|
||||
|
@@ -59,6 +59,8 @@ struct dim_resistance : isq::dim_resistance<dim_resistance, ohm, dim_voltage, di
|
||||
template<UnitOf<dim_resistance> U, Representation Rep = double>
|
||||
using resistance = quantity<dim_resistance, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// R
|
||||
@@ -131,6 +133,8 @@ constexpr auto operator"" _q_YR(long double l) { return resistance<yottaohm, lon
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto R = reference<dim_resistance, ohm>{};
|
||||
|
@@ -42,6 +42,8 @@ struct kilometre_per_hour : deduced_unit<kilometre_per_hour, dim_speed, kilometr
|
||||
template<UnitOf<dim_speed> U, Representation Rep = double>
|
||||
using speed = quantity<dim_speed, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// m/s
|
||||
@@ -54,4 +56,6 @@ constexpr auto operator"" _q_km_per_h(long double l) { return speed<kilometre_pe
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -40,6 +40,8 @@ struct dim_surface_tension : isq::dim_surface_tension<dim_surface_tension, newto
|
||||
template<UnitOf<dim_surface_tension> U, Representation Rep = double>
|
||||
using surface_tension = quantity<dim_surface_tension, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// N/m
|
||||
@@ -48,4 +50,6 @@ constexpr auto operator"" _q_N_per_m(long double l) { return surface_tension<new
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -41,6 +41,8 @@ struct dim_thermal_conductivity : isq::dim_thermal_conductivity<dim_thermal_cond
|
||||
template<UnitOf<dim_thermal_conductivity> U, Representation Rep = double>
|
||||
using thermal_conductivity = quantity<dim_thermal_conductivity, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// W/(m K)
|
||||
@@ -49,4 +51,6 @@ constexpr auto operator"" _q_W_per_m_K(long double l) { return thermal_conductiv
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -40,6 +40,8 @@ struct dim_thermodynamic_temperature : isq::dim_thermodynamic_temperature<kelvin
|
||||
template<UnitOf<dim_thermodynamic_temperature> U, Representation Rep = double>
|
||||
using thermodynamic_temperature = quantity<dim_thermodynamic_temperature, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// K
|
||||
@@ -48,6 +50,8 @@ constexpr auto operator"" _q_K(long double l) { return thermodynamic_temperature
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto K = reference<dim_thermodynamic_temperature, kelvin>{};
|
||||
|
@@ -52,6 +52,8 @@ struct dim_time : isq::dim_time<second> {};
|
||||
template<UnitOf<dim_time> U, Representation Rep = double>
|
||||
using time = quantity<dim_time, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// ys
|
||||
@@ -104,6 +106,8 @@ constexpr auto operator"" _q_d(long double l) { return time<day, long double>(l)
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto ys = reference<dim_time, yoctosecond>{};
|
||||
|
@@ -42,6 +42,8 @@ struct dim_torque : isq::dim_torque<dim_torque, newton_metre_per_radian, dim_for
|
||||
template<UnitOf<dim_torque> U, Representation Rep = double>
|
||||
using torque = quantity<dim_torque, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// Nm
|
||||
@@ -50,4 +52,6 @@ constexpr auto operator"" _q_Nm_per_rad(long double l) { return torque<newton_me
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
} // namespace units::isq::si
|
||||
|
@@ -63,6 +63,8 @@ struct dim_voltage : isq::dim_voltage<dim_voltage, volt, dim_power, dim_electric
|
||||
template<UnitOf<dim_voltage> U, Representation Rep = double>
|
||||
using voltage = quantity<dim_voltage, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// V
|
||||
@@ -151,6 +153,8 @@ constexpr auto operator"" _q_YV(long double l) { return voltage<yottavolt, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto V = reference<dim_voltage, volt>{};
|
||||
|
@@ -83,6 +83,8 @@ struct yottalitre : prefixed_unit<yottalitre, yotta, litre> {};
|
||||
template<UnitOf<dim_volume> U, Representation Rep = double>
|
||||
using volume = quantity<dim_volume, U, Rep>;
|
||||
|
||||
#if UNITS_UDLS
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
// m3
|
||||
@@ -255,6 +257,8 @@ constexpr auto operator"" _q_Yl(long double l) { return volume<yottalitre, long
|
||||
|
||||
} // namespace literals
|
||||
|
||||
#endif // UNITS_UDLS
|
||||
|
||||
namespace references {
|
||||
|
||||
inline constexpr auto m3 = reference<dim_volume, cubic_metre>{};
|
||||
|
Reference in New Issue
Block a user