style: all files refromatted with clang-format

This commit is contained in:
Mateusz Pusz committed 2022-03-17 23:59:48 +01:00
1 parent cc90985958
commit 144f6951c0
143 files changed
+5845 -3563

No files matched your search

@@ -28,11 +28,11 @@ namespace units::isq::iec80000 {
struct binary_prefix : prefix_family {};
struct kibi : units::prefix<kibi, binary_prefix, "Ki", ratio( 1'024)> {};
struct mebi : units::prefix<mebi, binary_prefix, "Mi", ratio( 1'048'576)> {};
struct gibi : units::prefix<gibi, binary_prefix, "Gi", ratio( 1'073'741'824)> {};
struct tebi : units::prefix<tebi, binary_prefix, "Ti", ratio( 1'099'511'627'776)> {};
struct pebi : units::prefix<pebi, binary_prefix, "Pi", ratio( 1'125'899'906'842'624)> {};
struct kibi : units::prefix<kibi, binary_prefix, "Ki", ratio(1'024)> {};
struct mebi : units::prefix<mebi, binary_prefix, "Mi", ratio(1'048'576)> {};
struct gibi : units::prefix<gibi, binary_prefix, "Gi", ratio(1'073'741'824)> {};
struct tebi : units::prefix<tebi, binary_prefix, "Ti", ratio(1'099'511'627'776)> {};
struct pebi : units::prefix<pebi, binary_prefix, "Pi", ratio(1'125'899'906'842'624)> {};
struct exbi : units::prefix<exbi, binary_prefix, "Ei", ratio(1'152'921'504'606'846'976)> {};
} // namespace units::isq::iec80000
@@ -54,19 +54,55 @@ using modulation_rate = quantity<dim_modulation_rate, U, Rep>;
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)); }
constexpr auto operator"" _q_kBd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return modulation_rate<kilobaud, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MBd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return modulation_rate<megabaud, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GBd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return modulation_rate<gigabaud, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TBd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return modulation_rate<terabaud, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PBd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return modulation_rate<petabaud, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EBd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return modulation_rate<exabaud, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZBd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return modulation_rate<zettabaud, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YBd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return modulation_rate<yottabaud, std::int64_t>(static_cast<std::int64_t>(l)); }
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));
}
constexpr auto operator"" _q_kBd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return modulation_rate<kilobaud, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MBd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return modulation_rate<megabaud, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GBd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return modulation_rate<gigabaud, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TBd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return modulation_rate<terabaud, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PBd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return modulation_rate<petabaud, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EBd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return modulation_rate<exabaud, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZBd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return modulation_rate<zettabaud, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YBd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return modulation_rate<yottabaud, std::int64_t>(static_cast<std::int64_t>(l));
}
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -90,7 +126,7 @@ using namespace modulation_rate_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::iec80000
@@ -98,16 +134,25 @@ using namespace modulation_rate_references;
namespace units::aliases::isq::iec80000::inline modulation_rate {
template<Representation Rep = double> using Bd = units::isq::iec80000::modulation_rate<units::isq::iec80000::baud, Rep>;
template<Representation Rep = double> using kBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::kilobaud, Rep>;
template<Representation Rep = double> using MBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::megabaud, Rep>;
template<Representation Rep = double> using GBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::gigabaud, Rep>;
template<Representation Rep = double> using TBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::terabaud, Rep>;
template<Representation Rep = double> using PBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::petabaud, Rep>;
template<Representation Rep = double> using EBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::exabaud, Rep>;
template<Representation Rep = double> using ZBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::zettabaud, Rep>;
template<Representation Rep = double> using YBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::yottabaud, Rep>;
template<Representation Rep = double>
using Bd = units::isq::iec80000::modulation_rate<units::isq::iec80000::baud, Rep>;
template<Representation Rep = double>
using kBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::kilobaud, Rep>;
template<Representation Rep = double>
using MBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::megabaud, Rep>;
template<Representation Rep = double>
using GBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::gigabaud, Rep>;
template<Representation Rep = double>
using TBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::terabaud, Rep>;
template<Representation Rep = double>
using PBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::petabaud, Rep>;
template<Representation Rep = double>
using EBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::exabaud, Rep>;
template<Representation Rep = double>
using ZBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::zettabaud, Rep>;
template<Representation Rep = double>
using YBd = units::isq::iec80000::modulation_rate<units::isq::iec80000::yottabaud, Rep>;
} // namespace units::aliases::isq::iec80000::inline modulation_rate
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -84,46 +84,163 @@ using storage_capacity = quantity<dim_storage_capacity, U, Rep>;
inline namespace literals {
// bits
constexpr auto operator"" _q_bit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<bit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_bit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<bit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kbit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<kilobit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Mbit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<megabit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Gbit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<gigabit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Tbit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<terabit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Pbit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<petabit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Ebit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<exabit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Zbit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<zettabit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Ybit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<yottabit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kbit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<kilobit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Mbit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<megabit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Gbit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<gigabit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Tbit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<terabit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Pbit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<petabit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Ebit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<exabit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Zbit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<zettabit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Ybit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<yottabit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Kibit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<kibibit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Mibit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<mebibit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Gibit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<gibibit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Tibit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<tebibit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Pibit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<pebibit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Eibit(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<exbibit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Kibit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<kibibit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Mibit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<mebibit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Gibit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<gibibit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Tibit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<tebibit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Pibit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<pebibit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Eibit(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<exbibit, std::int64_t>(static_cast<std::int64_t>(l));
}
// bytes
constexpr auto operator"" _q_B(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<byte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_B(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<byte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<kilobyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<megabyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<gigabyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<terabyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<petabyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<exabyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<zettabyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<yottabyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<kilobyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<megabyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<gigabyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<terabyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<petabyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<exabyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<zettabyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<yottabyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_KiB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<kibibyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MiB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<mebibyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GiB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<gibibyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TiB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<tebibyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PiB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<pebibyte, std::int64_t>(static_cast<std::int64_t>(l)); }
// constexpr auto operator"" _q_EiB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return storage_capacity<exbibyte, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_KiB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<kibibyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MiB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<mebibyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GiB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<gibibyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TiB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<tebibyte, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PiB(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return storage_capacity<pebibyte, std::int64_t>(static_cast<std::int64_t>(l));
}
// constexpr auto operator"" _q_EiB(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return
// storage_capacity<exbibyte, std::int64_t>(static_cast<std::int64_t>(l)); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -175,7 +292,7 @@ using namespace storage_capacity_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::iec80000
@@ -184,43 +301,73 @@ using namespace storage_capacity_references;
namespace units::aliases::isq::iec80000::inline storage_capacity {
// bits
template<Representation Rep = double> using bit = units::isq::iec80000::storage_capacity<units::isq::iec80000::bit, Rep>;
template<Representation Rep = double>
using bit = units::isq::iec80000::storage_capacity<units::isq::iec80000::bit, Rep>;
template<Representation Rep = double> using kbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::kilobit, Rep>;
template<Representation Rep = double> using Mbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::megabit, Rep>;
template<Representation Rep = double> using Gbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::gigabit, Rep>;
template<Representation Rep = double> using Tbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::terabit, Rep>;
template<Representation Rep = double> using Pbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::petabit, Rep>;
template<Representation Rep = double> using Ebit = units::isq::iec80000::storage_capacity<units::isq::iec80000::exabit, Rep>;
template<Representation Rep = double> using Zbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::zettabit, Rep>;
template<Representation Rep = double> using Ybit = units::isq::iec80000::storage_capacity<units::isq::iec80000::yottabit, Rep>;
template<Representation Rep = double>
using kbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::kilobit, Rep>;
template<Representation Rep = double>
using Mbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::megabit, Rep>;
template<Representation Rep = double>
using Gbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::gigabit, Rep>;
template<Representation Rep = double>
using Tbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::terabit, Rep>;
template<Representation Rep = double>
using Pbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::petabit, Rep>;
template<Representation Rep = double>
using Ebit = units::isq::iec80000::storage_capacity<units::isq::iec80000::exabit, Rep>;
template<Representation Rep = double>
using Zbit = units::isq::iec80000::storage_capacity<units::isq::iec80000::zettabit, Rep>;
template<Representation Rep = double>
using Ybit = units::isq::iec80000::storage_capacity<units::isq::iec80000::yottabit, Rep>;
template<Representation Rep = double> using Kibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::kibibit, Rep>;
template<Representation Rep = double> using Mibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::mebibit, Rep>;
template<Representation Rep = double> using Gibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::gibibit, Rep>;
template<Representation Rep = double> using Tibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::tebibit, Rep>;
template<Representation Rep = double> using Pibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::pebibit, Rep>;
template<Representation Rep = double> using Eibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::exbibit, Rep>;
template<Representation Rep = double>
using Kibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::kibibit, Rep>;
template<Representation Rep = double>
using Mibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::mebibit, Rep>;
template<Representation Rep = double>
using Gibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::gibibit, Rep>;
template<Representation Rep = double>
using Tibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::tebibit, Rep>;
template<Representation Rep = double>
using Pibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::pebibit, Rep>;
template<Representation Rep = double>
using Eibit = units::isq::iec80000::storage_capacity<units::isq::iec80000::exbibit, Rep>;
// bytes
template<Representation Rep = double> using B = units::isq::iec80000::storage_capacity<units::isq::iec80000::byte, Rep>;
template<Representation Rep = double>
using B = units::isq::iec80000::storage_capacity<units::isq::iec80000::byte, Rep>;
template<Representation Rep = double> using kB = units::isq::iec80000::storage_capacity<units::isq::iec80000::kilobyte, Rep>;
template<Representation Rep = double> using MB = units::isq::iec80000::storage_capacity<units::isq::iec80000::megabyte, Rep>;
template<Representation Rep = double> using GB = units::isq::iec80000::storage_capacity<units::isq::iec80000::gigabyte, Rep>;
template<Representation Rep = double> using TB = units::isq::iec80000::storage_capacity<units::isq::iec80000::terabyte, Rep>;
template<Representation Rep = double> using PB = units::isq::iec80000::storage_capacity<units::isq::iec80000::petabyte, Rep>;
template<Representation Rep = double> using EB = units::isq::iec80000::storage_capacity<units::isq::iec80000::exabyte, Rep>;
template<Representation Rep = double> using ZB = units::isq::iec80000::storage_capacity<units::isq::iec80000::zettabyte, Rep>;
template<Representation Rep = double> using YB = units::isq::iec80000::storage_capacity<units::isq::iec80000::yottabyte, Rep>;
template<Representation Rep = double>
using kB = units::isq::iec80000::storage_capacity<units::isq::iec80000::kilobyte, Rep>;
template<Representation Rep = double>
using MB = units::isq::iec80000::storage_capacity<units::isq::iec80000::megabyte, Rep>;
template<Representation Rep = double>
using GB = units::isq::iec80000::storage_capacity<units::isq::iec80000::gigabyte, Rep>;
template<Representation Rep = double>
using TB = units::isq::iec80000::storage_capacity<units::isq::iec80000::terabyte, Rep>;
template<Representation Rep = double>
using PB = units::isq::iec80000::storage_capacity<units::isq::iec80000::petabyte, Rep>;
template<Representation Rep = double>
using EB = units::isq::iec80000::storage_capacity<units::isq::iec80000::exabyte, Rep>;
template<Representation Rep = double>
using ZB = units::isq::iec80000::storage_capacity<units::isq::iec80000::zettabyte, Rep>;
template<Representation Rep = double>
using YB = units::isq::iec80000::storage_capacity<units::isq::iec80000::yottabyte, Rep>;
template<Representation Rep = double> using KiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::kibibyte, Rep>;
template<Representation Rep = double> using MiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::mebibyte, Rep>;
template<Representation Rep = double> using GiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::gibibyte, Rep>;
template<Representation Rep = double> using TiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::tebibyte, Rep>;
template<Representation Rep = double> using PiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::pebibyte, Rep>;
// template<Representation Rep = double> using EiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::exbibyte, Rep>;
template<Representation Rep = double>
using KiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::kibibyte, Rep>;
template<Representation Rep = double>
using MiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::mebibyte, Rep>;
template<Representation Rep = double>
using GiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::gibibyte, Rep>;
template<Representation Rep = double>
using TiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::tebibyte, Rep>;
template<Representation Rep = double>
using PiB = units::isq::iec80000::storage_capacity<units::isq::iec80000::pebibyte, Rep>;
// template<Representation Rep = double> using EiB =
// units::isq::iec80000::storage_capacity<units::isq::iec80000::exbibyte, Rep>;
} // namespace units::aliases::isq::iec80000::inline storage_capacity
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -47,11 +47,15 @@ using traffic_intensity = quantity<dim_traffic_intensity, U, Rep>;
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)); }
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_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -67,7 +71,7 @@ using namespace traffic_intensity_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::iec80000
@@ -75,8 +79,9 @@ using namespace traffic_intensity_references;
namespace units::aliases::isq::iec80000::inline traffic_intensity {
template<Representation Rep = double> using E = units::isq::iec80000::traffic_intensity<units::isq::iec80000::erlang, Rep>;
template<Representation Rep = double>
using E = units::isq::iec80000::traffic_intensity<units::isq::iec80000::erlang, Rep>;
} // namespace units::aliases::isq::iec80000::inline traffic_intensity
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -35,7 +35,9 @@
namespace units::isq::iec80000 {
struct byte_per_second : unit<byte_per_second> {};
struct dim_transfer_rate : derived_dimension<dim_transfer_rate, byte_per_second, exponent<dim_storage_capacity, 1>, exponent<si::dim_time, -1>> {};
struct dim_transfer_rate :
derived_dimension<dim_transfer_rate, byte_per_second, exponent<dim_storage_capacity, 1>,
exponent<si::dim_time, -1>> {};
struct kilobyte_per_second : derived_unit<kilobyte_per_second, dim_transfer_rate, kilobyte, si::second> {};
struct megabyte_per_second : derived_unit<megabyte_per_second, dim_transfer_rate, megabyte, si::second> {};
@@ -56,19 +58,55 @@ using transfer_rate = quantity<dim_transfer_rate, U, Rep>;
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)); }
constexpr auto operator"" _q_kB_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return transfer_rate<kilobyte_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MB_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return transfer_rate<megabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GB_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return transfer_rate<gigabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TB_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return transfer_rate<terabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PB_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return transfer_rate<petabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EB_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return transfer_rate<exabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZB_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return transfer_rate<zettabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YB_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return transfer_rate<yottabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
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));
}
constexpr auto operator"" _q_kB_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return transfer_rate<kilobyte_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MB_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return transfer_rate<megabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GB_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return transfer_rate<gigabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TB_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return transfer_rate<terabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PB_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return transfer_rate<petabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EB_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return transfer_rate<exabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZB_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return transfer_rate<zettabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YB_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return transfer_rate<yottabyte_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::iec80000
@@ -76,16 +114,25 @@ constexpr auto operator"" _q_YB_per_s(unsigned long long l) { gsl_ExpectsAudit(s
namespace units::aliases::isq::iec80000::inline transfer_rate {
template<Representation Rep = double> using B_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::byte_per_second, Rep>;
template<Representation Rep = double> using kB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::kilobyte_per_second, Rep>;
template<Representation Rep = double> using MB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::megabyte_per_second, Rep>;
template<Representation Rep = double> using GB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::gigabyte_per_second, Rep>;
template<Representation Rep = double> using TB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::terabyte_per_second, Rep>;
template<Representation Rep = double> using PB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::petabyte_per_second, Rep>;
template<Representation Rep = double> using EB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::exabyte_per_second, Rep>;
template<Representation Rep = double> using ZB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::zettabyte_per_second, Rep>;
template<Representation Rep = double> using YB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::yottabyte_per_second, Rep>;
template<Representation Rep = double>
using B_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::byte_per_second, Rep>;
template<Representation Rep = double>
using kB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::kilobyte_per_second, Rep>;
template<Representation Rep = double>
using MB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::megabyte_per_second, Rep>;
template<Representation Rep = double>
using GB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::gigabyte_per_second, Rep>;
template<Representation Rep = double>
using TB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::terabyte_per_second, Rep>;
template<Representation Rep = double>
using PB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::petabyte_per_second, Rep>;
template<Representation Rep = double>
using EB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::exabyte_per_second, Rep>;
template<Representation Rep = double>
using ZB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::zettabyte_per_second, Rep>;
template<Representation Rep = double>
using YB_per_s = units::isq::iec80000::transfer_rate<units::isq::iec80000::yottabyte_per_second, Rep>;
} // namespace units::aliases::isq::iec80000::inline transfer_rate
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -48,13 +48,13 @@ inline constexpr auto GeV = reference<dim_acceleration, gigaelectronvolt>{};
} // namespace acceleration_references
namespace references {
namespace references {
using namespace acceleration_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::natural
@@ -62,8 +62,9 @@ using namespace acceleration_references;
namespace units::aliases::isq::natural::inline acceleration {
template<Representation Rep = double> using GeV = units::isq::natural::acceleration<units::isq::natural::gigaelectronvolt, Rep>;
template<Representation Rep = double>
using GeV = units::isq::natural::acceleration<units::isq::natural::gigaelectronvolt, Rep>;
} // namespace units::aliases::isq::natural::inline acceleration
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -48,13 +48,13 @@ inline constexpr auto GeV = reference<dim_energy, gigaelectronvolt>{};
} // namespace energy_references
namespace references {
namespace references {
using namespace energy_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::natural
@@ -62,8 +62,9 @@ using namespace energy_references;
namespace units::aliases::isq::natural::inline energy {
template<Representation Rep = double> using GeV = units::isq::natural::energy<units::isq::natural::gigaelectronvolt, Rep>;
template<Representation Rep = double>
using GeV = units::isq::natural::energy<units::isq::natural::gigaelectronvolt, Rep>;
} // namespace units::aliases::isq::natural::inline energy
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -48,13 +48,13 @@ inline constexpr auto GeV2 = reference<dim_force, square_gigaelectronvolt>{};
} // namespace force_references
namespace references {
namespace references {
using namespace force_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::natural
@@ -62,8 +62,9 @@ using namespace force_references;
namespace units::aliases::isq::natural::inline force {
template<Representation Rep = double> using GeV2 = units::isq::natural::force<units::isq::natural::square_gigaelectronvolt, Rep>;
template<Representation Rep = double>
using GeV2 = units::isq::natural::force<units::isq::natural::square_gigaelectronvolt, Rep>;
} // namespace units::aliases::isq::natural::inline force
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -45,13 +45,13 @@ inline constexpr auto inv_GeV = reference<dim_length, inverted_gigaelectronvolt>
} // namespace length_references
namespace references {
namespace references {
using namespace length_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::natural
@@ -59,8 +59,9 @@ using namespace length_references;
namespace units::aliases::isq::natural::inline length {
template<Representation Rep = double> using inv_GeV = units::isq::natural::length<units::isq::natural::inverted_gigaelectronvolt, Rep>;
template<Representation Rep = double>
using inv_GeV = units::isq::natural::length<units::isq::natural::inverted_gigaelectronvolt, Rep>;
} // namespace units::aliases::isq::natural::inline length
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -45,13 +45,13 @@ inline constexpr auto GeV = reference<dim_mass, gigaelectronvolt>{};
} // namespace mass_references
namespace references {
namespace references {
using namespace mass_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::natural
@@ -59,8 +59,9 @@ using namespace mass_references;
namespace units::aliases::isq::natural::inline mass {
template<Representation Rep = double> using GeV = units::isq::natural::mass<units::isq::natural::gigaelectronvolt, Rep>;
template<Representation Rep = double>
using GeV = units::isq::natural::mass<units::isq::natural::gigaelectronvolt, Rep>;
} // namespace units::aliases::isq::natural::inline mass
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -48,13 +48,13 @@ inline constexpr auto GeV = reference<dim_momentum, gigaelectronvolt>{};
} // namespace momentum_references
namespace references {
namespace references {
using namespace momentum_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::natural
@@ -62,8 +62,9 @@ using namespace momentum_references;
namespace units::aliases::isq::natural::inline momentum {
template<Representation Rep = double> using GeV = units::isq::natural::momentum<units::isq::natural::gigaelectronvolt, Rep>;
template<Representation Rep = double>
using GeV = units::isq::natural::momentum<units::isq::natural::gigaelectronvolt, Rep>;
} // namespace units::aliases::isq::natural::inline momentum
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -45,13 +45,13 @@ inline constexpr auto inv_GeV = reference<dim_time, inverted_gigaelectronvolt>{}
} // namespace time_references
namespace references {
namespace references {
using namespace time_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::natural
@@ -59,8 +59,9 @@ using namespace time_references;
namespace units::aliases::isq::natural::inline time {
template<Representation Rep = double> using inv_GeV = units::isq::natural::time<units::isq::natural::inverted_gigaelectronvolt, Rep>;
template<Representation Rep = double>
using inv_GeV = units::isq::natural::time<units::isq::natural::inverted_gigaelectronvolt, Rep>;
} // namespace units::aliases::isq::natural::inline time
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -33,7 +33,8 @@ namespace units::isq::natural {
struct electronvolt : named_unit<electronvolt, "eV", si::prefix> {};
struct gigaelectronvolt : prefixed_unit<gigaelectronvolt, si::giga, electronvolt> {};
struct inverted_gigaelectronvolt : named_unit<inverted_gigaelectronvolt, basic_symbol_text{"GeV⁻¹", "GeV^-1"}, no_prefix> {};
struct inverted_gigaelectronvolt :
named_unit<inverted_gigaelectronvolt, basic_symbol_text{"GeV⁻¹", "GeV^-1"}, no_prefix> {};
struct square_gigaelectronvolt : named_unit<square_gigaelectronvolt, basic_symbol_text{"GeV²", "GeV^2"}, no_prefix> {};
// NOTE: eV as a base unit with no relation to joule prevents us from going back
@@ -22,8 +22,8 @@
#pragma once
#include <units/generic/angle.h>
#include <units/concepts.h>
#include <units/generic/angle.h>
#include <units/isq/dimensions/time.h>
namespace units::isq {
@@ -34,7 +34,7 @@ struct dim_angular_velocity;
template<typename Child, Unit U, DimensionOfT<dim_angle> A, DimensionOfT<dim_time> T>
struct dim_angular_velocity<Child, U, A, T> : derived_dimension<Child, U, exponent<A, 1>, exponent<T, -1>> {};
template <typename T>
template<typename T>
concept AngularVelocity = QuantityOfT<T, dim_angular_velocity>;
} // namespace units::isq
@@ -22,8 +22,8 @@
#pragma once
#include <units/isq/dimensions/amount_of_substance.h>
#include <units/concepts.h>
#include <units/isq/dimensions/amount_of_substance.h>
#include <units/isq/dimensions/time.h>
namespace units::isq {
@@ -23,8 +23,8 @@
#pragma once
#include <units/concepts.h>
#include <units/isq/dimensions/length.h>
#include <units/isq/dimensions/amount_of_substance.h>
#include <units/isq/dimensions/length.h>
namespace units::isq {
@@ -22,8 +22,8 @@
#pragma once
#include <units/isq/dimensions/acceleration.h>
#include <units/concepts.h>
#include <units/isq/dimensions/acceleration.h>
#include <units/isq/dimensions/mass.h>
namespace units::isq {
@@ -22,8 +22,8 @@
#pragma once
#include <units/isq/dimensions/amount_of_substance.h>
#include <units/concepts.h>
#include <units/isq/dimensions/amount_of_substance.h>
#include <units/isq/dimensions/energy.h>
#include <units/isq/dimensions/mass.h>
#include <units/isq/dimensions/thermodynamic_temperature.h>
@@ -23,8 +23,8 @@
#pragma once
#include <units/concepts.h>
#include <units/isq/dimensions/luminous_intensity.h>
#include <units/isq/dimensions/length.h>
#include <units/isq/dimensions/luminous_intensity.h>
namespace units::isq {
@@ -22,8 +22,8 @@
#pragma once
#include <units/isq/dimensions/area.h>
#include <units/concepts.h>
#include <units/isq/dimensions/area.h>
#include <units/isq/dimensions/magnetic_induction.h>
namespace units::isq {
@@ -29,11 +29,12 @@
namespace units::isq {
template <typename Child, Unit U, typename...>
template<typename Child, Unit U, typename...>
struct dim_magnetic_induction;
template <typename Child, Unit U, DimensionOfT<dim_voltage> V, DimensionOfT<dim_time> T, DimensionOfT<dim_length> L>
struct dim_magnetic_induction<Child, U, V, T, L> : derived_dimension<Child, U, exponent<V, 1>, exponent<T, 1>, exponent<L, -2>> {};
template<typename Child, Unit U, DimensionOfT<dim_voltage> V, DimensionOfT<dim_time> T, DimensionOfT<dim_length> L>
struct dim_magnetic_induction<Child, U, V, T, L> :
derived_dimension<Child, U, exponent<V, 1>, exponent<T, 1>, exponent<L, -2>> {};
template<typename T>
concept MagneticInduction = QuantityOfT<T, dim_magnetic_induction>;
@@ -22,8 +22,8 @@
#pragma once
#include <units/isq/dimensions/amount_of_substance.h>
#include <units/concepts.h>
#include <units/isq/dimensions/amount_of_substance.h>
#include <units/isq/dimensions/energy.h>
namespace units::isq {
@@ -22,8 +22,8 @@
#pragma once
#include <units/isq/dimensions/capacitance.h>
#include <units/concepts.h>
#include <units/isq/dimensions/capacitance.h>
#include <units/isq/dimensions/length.h>
namespace units::isq {
@@ -22,8 +22,8 @@
#pragma once
#include <units/isq/dimensions/area.h>
#include <units/concepts.h>
#include <units/isq/dimensions/area.h>
#include <units/isq/dimensions/force.h>
namespace units::isq {
@@ -28,11 +28,11 @@
namespace units::isq {
template <typename Child, Unit U, typename...>
template<typename Child, Unit U, typename...>
struct dim_resistance;
template <typename Child, Unit U, DimensionOfT<dim_voltage> V, DimensionOfT<dim_electric_current> C>
struct dim_resistance<Child, U, V, C> : derived_dimension<Child,U, exponent<V, 1>, exponent<C, -1>> {};
template<typename Child, Unit U, DimensionOfT<dim_voltage> V, DimensionOfT<dim_electric_current> C>
struct dim_resistance<Child, U, V, C> : derived_dimension<Child, U, exponent<V, 1>, exponent<C, -1>> {};
template<typename T>
concept Resistance = QuantityOfT<T, dim_resistance>;
@@ -32,8 +32,10 @@ namespace units::isq {
template<typename Child, Unit U, typename...>
struct dim_thermal_conductivity;
template<typename Child, Unit U, DimensionOfT<dim_power> P, DimensionOfT<dim_length> L, DimensionOfT<dim_thermodynamic_temperature> T>
struct dim_thermal_conductivity<Child, U, P, L, T> : derived_dimension<Child, U, exponent<P, 1>, exponent<L, -1>, exponent<T, -1>> {};
template<typename Child, Unit U, DimensionOfT<dim_power> P, DimensionOfT<dim_length> L,
DimensionOfT<dim_thermodynamic_temperature> T>
struct dim_thermal_conductivity<Child, U, P, L, T> :
derived_dimension<Child, U, exponent<P, 1>, exponent<L, -1>, exponent<T, -1>> {};
template<typename T>
concept ThermalConductivity = QuantityOfT<T, dim_thermal_conductivity>;
@@ -22,8 +22,8 @@
#pragma once
#include <units/generic/angle.h>
#include <units/concepts.h>
#include <units/generic/angle.h>
#include <units/isq/dimensions/energy.h>
namespace units::isq {
@@ -45,12 +45,16 @@ using acceleration = quantity<dim_acceleration, U, Rep>;
inline namespace literals {
// Gal
constexpr auto operator"" _q_Gal(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return acceleration<gal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Gal(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return acceleration<gal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Gal(long double l) { return acceleration<gal, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -66,7 +70,7 @@ using namespace acceleration_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::cgs
@@ -74,8 +78,9 @@ using namespace acceleration_references;
namespace units::aliases::isq::si::cgs::inline acceleration {
template<Representation Rep = double> using Gal = units::isq::si::cgs::acceleration<units::isq::si::cgs::gal, Rep>;
template<Representation Rep = double>
using Gal = units::isq::si::cgs::acceleration<units::isq::si::cgs::gal, Rep>;
} // namespace units::aliases::isq::si::cgs::inline acceleration
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -47,12 +47,16 @@ using area = quantity<dim_area, U, Rep>;
inline namespace literals {
// cm2
constexpr auto operator"" _q_cm2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return area<square_centimetre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_cm2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return area<square_centimetre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_cm2(long double l) { return area<square_centimetre, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -68,7 +72,7 @@ using namespace area_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::cgs
@@ -76,8 +80,9 @@ using namespace area_references;
namespace units::aliases::isq::si::cgs::inline area {
template<Representation Rep = double> using cm2 = units::isq::si::cgs::area<units::isq::si::cgs::square_centimetre, Rep>;
template<Representation Rep = double>
using cm2 = units::isq::si::cgs::area<units::isq::si::cgs::square_centimetre, Rep>;
} // namespace units::aliases::isq::si::cgs::inline area
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -23,15 +23,14 @@
#pragma once
// IWYU pragma: begin_exports
#include <units/isq/si/cgs/length.h>
#include <units/isq/si/cgs/mass.h>
#include <units/isq/si/cgs/time.h>
#include <units/isq/si/cgs/acceleration.h>
#include <units/isq/si/cgs/area.h>
#include <units/isq/si/cgs/energy.h>
#include <units/isq/si/cgs/force.h>
#include <units/isq/si/cgs/length.h>
#include <units/isq/si/cgs/mass.h>
#include <units/isq/si/cgs/power.h>
#include <units/isq/si/cgs/pressure.h>
#include <units/isq/si/cgs/speed.h>
#include <units/isq/si/cgs/time.h>
// IWYU pragma: end_exports
@@ -47,12 +47,16 @@ using energy = quantity<dim_energy, U, Rep>;
inline namespace literals {
// erg
constexpr auto operator"" _q_erg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<erg, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_erg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<erg, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_erg(long double l) { return energy<erg, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -68,7 +72,7 @@ using namespace energy_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::cgs
@@ -76,8 +80,9 @@ using namespace energy_references;
namespace units::aliases::isq::si::cgs::inline energy {
template<Representation Rep = double> using erg = units::isq::si::cgs::energy<units::isq::si::cgs::erg, Rep>;
template<Representation Rep = double>
using erg = units::isq::si::cgs::energy<units::isq::si::cgs::erg, Rep>;
} // namespace units::aliases::isq::si::cgs::inline energy
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -48,12 +48,16 @@ using force = quantity<dim_force, U, Rep>;
inline namespace literals {
// dyn
constexpr auto operator"" _q_dyn(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return force<dyne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dyn(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return force<dyne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dyn(long double l) { return force<dyne, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -69,7 +73,7 @@ using namespace force_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::cgs
@@ -77,8 +81,9 @@ using namespace force_references;
namespace units::aliases::isq::si::cgs::inline force {
template<Representation Rep = double> using dyn = units::isq::si::cgs::force<units::isq::si::cgs::dyne, Rep>;
template<Representation Rep = double>
using dyn = units::isq::si::cgs::force<units::isq::si::cgs::dyne, Rep>;
} // namespace units::aliases::isq::si::cgs::inline force
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -46,12 +46,16 @@ using length = quantity<dim_length, U, Rep>;
inline namespace literals {
// cm
constexpr auto operator"" _q_cm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<centimetre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_cm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<centimetre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_cm(long double l) { return length<centimetre, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -67,7 +71,7 @@ using namespace length_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::cgs
@@ -75,8 +79,9 @@ using namespace length_references;
namespace units::aliases::isq::si::cgs::inline length {
template<Representation Rep = double> using cm = units::isq::si::cgs::length<units::isq::si::cgs::centimetre, Rep>;
template<Representation Rep = double>
using cm = units::isq::si::cgs::length<units::isq::si::cgs::centimetre, Rep>;
} // namespace units::aliases::isq::si::cgs::inline length
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -46,12 +46,16 @@ using mass = quantity<dim_mass, U, Rep>;
inline namespace literals {
// g
constexpr auto operator"" _q_g(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<gram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_g(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<gram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_g(long double l) { return mass<gram, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -67,7 +71,7 @@ using namespace mass_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::cgs
@@ -75,8 +79,9 @@ using namespace mass_references;
namespace units::aliases::isq::si::cgs::inline mass {
template<Representation Rep = double> using g = units::isq::si::cgs::mass<units::isq::si::cgs::gram, Rep>;
template<Representation Rep = double>
using g = units::isq::si::cgs::mass<units::isq::si::cgs::gram, Rep>;
} // namespace units::aliases::isq::si::cgs::inline mass
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -46,12 +46,16 @@ using power = quantity<dim_power, U, Rep>;
inline namespace literals {
// erg/s
constexpr auto operator"" _q_erg_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<erg_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_erg_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<erg_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_erg_per_s(long double l) { return power<erg_per_second, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si::cgs
@@ -59,8 +63,9 @@ constexpr auto operator"" _q_erg_per_s(long double l) { return power<erg_per_sec
namespace units::aliases::isq::si::cgs::inline power {
template<Representation Rep = double> using erg_per_s = units::isq::si::cgs::power<units::isq::si::cgs::erg_per_second, Rep>;
template<Representation Rep = double>
using erg_per_s = units::isq::si::cgs::power<units::isq::si::cgs::erg_per_second, Rep>;
} // namespace units::aliases::isq::si::cgs::inline power
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -48,12 +48,16 @@ using pressure = quantity<dim_pressure, U, Rep>;
inline namespace literals {
// Ba
constexpr auto operator"" _q_Ba(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return pressure<barye, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Ba(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return pressure<barye, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Ba(long double l) { return pressure<barye, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -69,7 +73,7 @@ using namespace pressure_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::cgs
@@ -77,8 +81,9 @@ using namespace pressure_references;
namespace units::aliases::isq::si::cgs::inline pressure {
template<Representation Rep = double> using Ba = units::isq::si::cgs::pressure<units::isq::si::cgs::barye, Rep>;
template<Representation Rep = double>
using Ba = units::isq::si::cgs::pressure<units::isq::si::cgs::barye, Rep>;
} // namespace units::aliases::isq::si::cgs::inline pressure
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -45,12 +45,16 @@ using speed = quantity<dim_speed, U, Rep>;
inline namespace literals {
// cm/s
constexpr auto operator"" _q_cm_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return speed<centimetre_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_cm_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return speed<centimetre_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_cm_per_s(long double l) { return speed<centimetre_per_second, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si::cgs
@@ -58,8 +62,9 @@ constexpr auto operator"" _q_cm_per_s(long double l) { return speed<centimetre_p
namespace units::aliases::isq::si::cgs::inline speed {
template<Representation Rep = double> using cm_per_s = units::isq::si::cgs::speed<units::isq::si::cgs::centimetre_per_second, Rep>;
template<Representation Rep = double>
using cm_per_s = units::isq::si::cgs::speed<units::isq::si::cgs::centimetre_per_second, Rep>;
} // namespace units::aliases::isq::si::cgs::inline speed
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -45,7 +45,7 @@ using si::literals::operator"" _q_s;
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -61,7 +61,7 @@ using namespace time_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::cgs
@@ -73,4 +73,4 @@ using namespace units::aliases::isq::si::time;
} // namespace units::aliases::isq::si::cgs::inline time
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -41,8 +41,8 @@ struct inch : named_scaled_unit<inch, "in", no_prefix, ratio(1, 12), foot> {};
// thousandth of an inch
struct thousandth : named_scaled_unit<thousandth, "thou", no_prefix, ratio(1, 1'000), inch> {};
struct thou : alias_unit<thousandth, "thou", no_prefix>{};
struct mil : alias_unit<thousandth, "mil", no_prefix>{};
struct thou : alias_unit<thousandth, "thou", no_prefix> {};
struct mil : alias_unit<thousandth, "mil", no_prefix> {};
struct yard : named_scaled_unit<yard, "yd", si::prefix, ratio(3, 1), foot> {};
@@ -64,43 +64,79 @@ using length = quantity<dim_length, U, Rep>;
inline namespace literals {
// Thousandth
constexpr auto operator"" _q_thou(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<thousandth, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_thou(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<thousandth, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_thou(long double l) { return length<thousandth, long double>(l); }
constexpr auto operator"" _q_mil(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<thousandth, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mil(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<thousandth, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mil(long double l) { return length<thousandth, long double>(l); }
// Inch
constexpr auto operator"" _q_in(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<inch, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_in(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<inch, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_in(long double l) { return length<inch, long double>(l); }
// Foot
constexpr auto operator"" _q_ft(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<foot, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ft(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<foot, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ft(long double l) { return length<foot, long double>(l); }
// Yard
constexpr auto operator"" _q_yd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<yard, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<yard, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yd(long double l) { return length<yard, long double>(l); }
// Fathom
constexpr auto operator"" _q_ftm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<fathom, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ftm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<fathom, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ftm(long double l) { return length<fathom, long double>(l); }
// Kiloyard
constexpr auto operator"" _q_kyd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<kiloyard, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kyd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<kiloyard, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kyd(long double l) { return length<kiloyard, long double>(l); }
// Mile
constexpr auto operator"" _q_mile(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<mile, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mile(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<mile, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mile(long double l) { return length<mile, long double>(l); }
// Nautical mile
constexpr auto operator"" _q_naut_mi(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<nautical_mile, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_naut_mi(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<nautical_mile, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_naut_mi(long double l) { return length<nautical_mile, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -125,7 +161,7 @@ using namespace length_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::fps
@@ -133,17 +169,26 @@ using namespace length_references;
namespace units::aliases::isq::si::fps::inline length {
template<Representation Rep = double> using thou = units::isq::si::fps::length<units::isq::si::fps::thousandth, Rep>;
template<Representation Rep = double> using mil = thou<Rep>;
template<Representation Rep = double>
using thou = units::isq::si::fps::length<units::isq::si::fps::thousandth, Rep>;
template<Representation Rep = double>
using mil = thou<Rep>;
template<Representation Rep = double> using in = units::isq::si::fps::length<units::isq::si::fps::inch, Rep>;
template<Representation Rep = double> using ft = units::isq::si::fps::length<units::isq::si::fps::foot, Rep>;
template<Representation Rep = double> using yd = units::isq::si::fps::length<units::isq::si::fps::yard, Rep>;
template<Representation Rep = double> using ftm = units::isq::si::fps::length<units::isq::si::fps::fathom, Rep>;
template<Representation Rep = double> using kyd = units::isq::si::fps::length<units::isq::si::fps::kiloyard, Rep>;
template<Representation Rep = double> using mile = units::isq::si::fps::length<units::isq::si::fps::mile, Rep>;
template<Representation Rep = double> using naut_mi = units::isq::si::fps::length<units::isq::si::fps::nautical_mile, Rep>;
template<Representation Rep = double>
using in = units::isq::si::fps::length<units::isq::si::fps::inch, Rep>;
template<Representation Rep = double>
using ft = units::isq::si::fps::length<units::isq::si::fps::foot, Rep>;
template<Representation Rep = double>
using yd = units::isq::si::fps::length<units::isq::si::fps::yard, Rep>;
template<Representation Rep = double>
using ftm = units::isq::si::fps::length<units::isq::si::fps::fathom, Rep>;
template<Representation Rep = double>
using kyd = units::isq::si::fps::length<units::isq::si::fps::kiloyard, Rep>;
template<Representation Rep = double>
using mile = units::isq::si::fps::length<units::isq::si::fps::mile, Rep>;
template<Representation Rep = double>
using naut_mi = units::isq::si::fps::length<units::isq::si::fps::nautical_mile, Rep>;
} // namespace units::aliases::isq::si::fps::inline length
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -42,65 +42,101 @@ struct dim_mass : isq::dim_mass<pound> {};
template<UnitOf<dim_mass> U, Representation Rep = double>
using mass = quantity<dim_mass, U, Rep>;
struct grain : named_scaled_unit<grain, "gr", no_prefix, ratio(1, 7000), pound>{};
struct grain : named_scaled_unit<grain, "gr", no_prefix, ratio(1, 7000), pound> {};
struct dram : named_scaled_unit<dram, "dr", no_prefix, ratio(1, 256), pound>{};
struct dram : named_scaled_unit<dram, "dr", no_prefix, ratio(1, 256), pound> {};
struct ounce : named_scaled_unit<ounce, "oz", no_prefix, ratio(1, 16), pound>{};
struct ounce : named_scaled_unit<ounce, "oz", no_prefix, ratio(1, 16), pound> {};
struct stone : named_scaled_unit<stone, "st", no_prefix, ratio(14, 1), pound>{};
struct stone : named_scaled_unit<stone, "st", no_prefix, ratio(14, 1), pound> {};
struct quarter : named_scaled_unit<quarter, "qr", no_prefix, ratio(28, 1), pound>{};
struct quarter : named_scaled_unit<quarter, "qr", no_prefix, ratio(28, 1), pound> {};
struct hundredweight : named_scaled_unit<hundredweight, "cwt", no_prefix, ratio(112, 1), pound>{};
struct hundredweight : named_scaled_unit<hundredweight, "cwt", no_prefix, ratio(112, 1), pound> {};
struct short_ton : named_scaled_unit<short_ton, "ton (short)", no_prefix, ratio(2'000, 1), pound>{};
struct short_ton : named_scaled_unit<short_ton, "ton (short)", no_prefix, ratio(2'000, 1), pound> {};
struct long_ton : named_scaled_unit<long_ton, "ton (long)", no_prefix, ratio(2'240, 1), pound>{};
struct long_ton : named_scaled_unit<long_ton, "ton (long)", no_prefix, ratio(2'240, 1), pound> {};
#ifndef UNITS_NO_LITERALS
inline namespace literals {
// Grain
constexpr auto operator"" _q_gr(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<grain, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_gr(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<grain, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_gr(long double l) { return mass<grain, long double>(l); }
// Dram
constexpr auto operator"" _q_dr(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<dram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dr(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<dram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dr(long double l) { return mass<dram, long double>(l); }
// Ounce
constexpr auto operator"" _q_oz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<ounce, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_oz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<ounce, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_oz(long double l) { return mass<ounce, long double>(l); }
// Pound
constexpr auto operator"" _q_lb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<pound, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_lb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<pound, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_lb(long double l) { return mass<pound, long double>(l); }
// Stone
constexpr auto operator"" _q_st(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<stone, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_st(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<stone, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_st(long double l) { return mass<stone, long double>(l); }
// Quarter
constexpr auto operator"" _q_qr(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<quarter, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_qr(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<quarter, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_qr(long double l) { return mass<quarter, long double>(l); }
// Hundredweight
constexpr auto operator"" _q_cwt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<hundredweight, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_cwt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<hundredweight, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_cwt(long double l) { return mass<hundredweight, long double>(l); }
// Short ton
constexpr auto operator"" _q_ston(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<short_ton, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ston(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<short_ton, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ston(long double l) { return mass<short_ton, long double>(l); }
// Long Ton
constexpr auto operator"" _q_lton(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<long_ton, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_lton(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<long_ton, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_lton(long double l) { return mass<long_ton, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -124,7 +160,7 @@ using namespace mass_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::fps
@@ -132,16 +168,25 @@ using namespace mass_references;
namespace units::aliases::isq::si::fps::inline mass {
template<Representation Rep = double> using gr = units::isq::si::fps::mass<units::isq::si::fps::grain, Rep>;
template<Representation Rep = double> using dr = units::isq::si::fps::mass<units::isq::si::fps::dram, Rep>;
template<Representation Rep = double> using oz = units::isq::si::fps::mass<units::isq::si::fps::ounce, Rep>;
template<Representation Rep = double> using lb = units::isq::si::fps::mass<units::isq::si::fps::pound, Rep>;
template<Representation Rep = double> using st = units::isq::si::fps::mass<units::isq::si::fps::stone, Rep>;
template<Representation Rep = double> using qr = units::isq::si::fps::mass<units::isq::si::fps::quarter, Rep>;
template<Representation Rep = double> using cwt = units::isq::si::fps::mass<units::isq::si::fps::hundredweight, Rep>;
template<Representation Rep = double> using ston = units::isq::si::fps::mass<units::isq::si::fps::short_ton, Rep>;
template<Representation Rep = double> using lton = units::isq::si::fps::mass<units::isq::si::fps::long_ton, Rep>;
template<Representation Rep = double>
using gr = units::isq::si::fps::mass<units::isq::si::fps::grain, Rep>;
template<Representation Rep = double>
using dr = units::isq::si::fps::mass<units::isq::si::fps::dram, Rep>;
template<Representation Rep = double>
using oz = units::isq::si::fps::mass<units::isq::si::fps::ounce, Rep>;
template<Representation Rep = double>
using lb = units::isq::si::fps::mass<units::isq::si::fps::pound, Rep>;
template<Representation Rep = double>
using st = units::isq::si::fps::mass<units::isq::si::fps::stone, Rep>;
template<Representation Rep = double>
using qr = units::isq::si::fps::mass<units::isq::si::fps::quarter, Rep>;
template<Representation Rep = double>
using cwt = units::isq::si::fps::mass<units::isq::si::fps::hundredweight, Rep>;
template<Representation Rep = double>
using ston = units::isq::si::fps::mass<units::isq::si::fps::short_ton, Rep>;
template<Representation Rep = double>
using lton = units::isq::si::fps::mass<units::isq::si::fps::long_ton, Rep>;
} // namespace units::aliases::isq::si::fps::inline mass
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -51,20 +51,32 @@ using power = quantity<dim_power, U, Rep>;
inline namespace literals {
// foot pound force per second
constexpr auto operator"" _q_ft_pdl_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<foot_poundal_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ft_pdl_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<foot_poundal_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ft_pdl_per_s(long double l) { return power<foot_poundal_per_second, long double>(l); }
// foot pound force per second
constexpr auto operator"" _q_ft_lbf_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<foot_pound_force_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ft_lbf_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<foot_pound_force_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ft_lbf_per_s(long double l) { return power<foot_pound_force_per_second, long double>(l); }
// horse power
constexpr auto operator"" _q_hp(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<horse_power, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_hp(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<horse_power, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_hp(long double l) { return power<horse_power, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -80,7 +92,7 @@ using namespace power_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::fps
@@ -88,10 +100,13 @@ using namespace power_references;
namespace units::aliases::isq::si::fps::inline power {
template<Representation Rep = double> using ft_pdl_per_s = units::isq::si::fps::power<units::isq::si::fps::foot_poundal_per_second, Rep>;
template<Representation Rep = double> using ft_lbf_per_s = units::isq::si::fps::power<units::isq::si::fps::foot_pound_force_per_second, Rep>;
template<Representation Rep = double> using hp = units::isq::si::fps::power<units::isq::si::fps::horse_power, Rep>;
template<Representation Rep = double>
using ft_pdl_per_s = units::isq::si::fps::power<units::isq::si::fps::foot_poundal_per_second, Rep>;
template<Representation Rep = double>
using ft_lbf_per_s = units::isq::si::fps::power<units::isq::si::fps::foot_pound_force_per_second, Rep>;
template<Representation Rep = double>
using hp = units::isq::si::fps::power<units::isq::si::fps::horse_power, Rep>;
} // namespace units::aliases::isq::si::fps::inline power
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -34,9 +34,9 @@
namespace units::isq::si::fps {
using si::second;
using si::minute;
using si::hour;
using si::minute;
using si::second;
using si::dim_time;
using si::time;
@@ -49,7 +49,7 @@ using si::literals::operator"" _q_s;
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -65,7 +65,7 @@ using namespace time_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::fps
@@ -77,4 +77,4 @@ using namespace units::aliases::isq::si::time;
} // namespace units::aliases::isq::si::fps::inline time
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -47,16 +47,24 @@ using volume = quantity<dim_volume, U, Rep>;
inline namespace literals {
// ft3
constexpr auto operator"" _q_ft3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_foot, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ft3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_foot, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ft3(long double l) { return volume<cubic_foot, long double>(l); }
// yd3
constexpr auto operator"" _q_yd3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_yard, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yd3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_yard, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yd3(long double l) { return volume<cubic_yard, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -73,7 +81,7 @@ using namespace volume_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::fps
@@ -81,9 +89,11 @@ using namespace volume_references;
namespace units::aliases::isq::si::fps::inline volume {
template<Representation Rep = double> using ft3 = units::isq::si::fps::volume<units::isq::si::fps::cubic_foot, Rep>;
template<Representation Rep = double> using yd3 = units::isq::si::fps::volume<units::isq::si::fps::cubic_yard, Rep>;
template<Representation Rep = double>
using ft3 = units::isq::si::fps::volume<units::isq::si::fps::cubic_foot, Rep>;
template<Representation Rep = double>
using yd3 = units::isq::si::fps::volume<units::isq::si::fps::cubic_yard, Rep>;
} // namespace units::aliases::isq::si::fps::inline volume
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -34,9 +34,9 @@
namespace units::isq::si::hep {
using units::isq::si::electronvolt;
struct yeV : prefixed_unit<yeV, yocto, electronvolt> {}; // N.B. very rarely used
struct zeV : prefixed_unit<zeV, zepto, electronvolt> {}; // N.B. very rarely used
struct aeV : prefixed_unit<aeV, atto, electronvolt> {}; // N.B. very rarely used
struct yeV : prefixed_unit<yeV, yocto, electronvolt> {}; // N.B. very rarely used
struct zeV : prefixed_unit<zeV, zepto, electronvolt> {}; // N.B. very rarely used
struct aeV : prefixed_unit<aeV, atto, electronvolt> {}; // N.B. very rarely used
struct feV : prefixed_unit<feV, femto, electronvolt> {};
struct peV : prefixed_unit<peV, pico, electronvolt> {};
struct neV : prefixed_unit<neV, nano, electronvolt> {};
@@ -48,9 +48,9 @@ struct MeV : prefixed_unit<MeV, mega, electronvolt> {};
using GeV = gigaelectronvolt;
struct TeV : prefixed_unit<TeV, tera, electronvolt> {};
struct PeV : prefixed_unit<PeV, peta, electronvolt> {};
struct EeV : prefixed_unit<EeV, exa, electronvolt> {}; // N.B. very rarely used
struct ZeV : prefixed_unit<ZeV, zetta, electronvolt> {}; // N.B. very rarely used
struct YeV : prefixed_unit<YeV, yotta, electronvolt> {}; // N.B. very rarely used
struct EeV : prefixed_unit<EeV, exa, electronvolt> {}; // N.B. very rarely used
struct ZeV : prefixed_unit<ZeV, zetta, electronvolt> {}; // N.B. very rarely used
struct YeV : prefixed_unit<YeV, yotta, electronvolt> {}; // N.B. very rarely used
template<UnitOf<dim_energy> U, Representation Rep = double>
using energy = quantity<dim_energy, U, Rep>;
@@ -59,39 +59,95 @@ using energy = quantity<dim_energy, U, Rep>;
inline namespace literals {
constexpr auto operator"" _q_feV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<feV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_feV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<feV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_feV(long double l) { return energy<feV, long double>(l); }
constexpr auto operator"" _q_peV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<peV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_peV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<peV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_peV(long double l) { return energy<peV, long double>(l); }
constexpr auto operator"" _q_neV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<neV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_neV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<neV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_neV(long double l) { return energy<ueV, long double>(l); }
constexpr auto operator"" _q_ueV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<neV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ueV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<neV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ueV(long double l) { return energy<ueV, long double>(l); }
constexpr auto operator"" _q_meV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<meV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_meV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<meV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_meV(long double l) { return energy<meV, long double>(l); }
constexpr auto operator"" _q_eV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<eV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_eV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<eV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_eV(long double l) { return energy<eV, long double>(l); }
constexpr auto operator"" _q_keV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<keV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_keV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<keV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_keV(long double l) { return energy<keV, long double>(l); }
constexpr auto operator"" _q_MeV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<MeV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MeV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<MeV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MeV(long double l) { return energy<MeV, long double>(l); }
constexpr auto operator"" _q_GeV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<GeV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GeV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<GeV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GeV(long double l) { return energy<GeV, long double>(l); }
constexpr auto operator"" _q_TeV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<TeV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TeV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<TeV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TeV(long double l) { return energy<TeV, long double>(l); }
constexpr auto operator"" _q_PeV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<PeV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PeV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<PeV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PeV(long double l) { return energy<PeV, long double>(l); }
constexpr auto operator"" _q_EeV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<EeV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EeV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<EeV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EeV(long double l) { return energy<EeV, long double>(l); }
constexpr auto operator"" _q_ZeV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<ZeV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZeV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<ZeV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZeV(long double l) { return energy<ZeV, long double>(l); }
constexpr auto operator"" _q_YeV(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy<YeV, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YeV(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy<YeV, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YeV(long double l) { return energy<YeV, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -107,7 +163,7 @@ using namespace energy_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::hep
@@ -115,26 +171,43 @@ using namespace energy_references;
namespace units::aliases::isq::si::hep::inline energy {
template<Representation Rep = double> using yeV = units::isq::si::hep::energy<units::isq::si::hep::yeV, Rep>;
template<Representation Rep = double> using zeV = units::isq::si::hep::energy<units::isq::si::hep::zeV, Rep>;
template<Representation Rep = double> using aeV = units::isq::si::hep::energy<units::isq::si::hep::aeV, Rep>;
template<Representation Rep = double> using feV = units::isq::si::hep::energy<units::isq::si::hep::feV, Rep>;
template<Representation Rep = double> using peV = units::isq::si::hep::energy<units::isq::si::hep::peV, Rep>;
template<Representation Rep = double> using neV = units::isq::si::hep::energy<units::isq::si::hep::neV, Rep>;
template<Representation Rep = double> using ueV = units::isq::si::hep::energy<units::isq::si::hep::ueV, Rep>;
template<Representation Rep = double> using meV = units::isq::si::hep::energy<units::isq::si::hep::meV, Rep>;
template<Representation Rep = double>
using yeV = units::isq::si::hep::energy<units::isq::si::hep::yeV, Rep>;
template<Representation Rep = double>
using zeV = units::isq::si::hep::energy<units::isq::si::hep::zeV, Rep>;
template<Representation Rep = double>
using aeV = units::isq::si::hep::energy<units::isq::si::hep::aeV, Rep>;
template<Representation Rep = double>
using feV = units::isq::si::hep::energy<units::isq::si::hep::feV, Rep>;
template<Representation Rep = double>
using peV = units::isq::si::hep::energy<units::isq::si::hep::peV, Rep>;
template<Representation Rep = double>
using neV = units::isq::si::hep::energy<units::isq::si::hep::neV, Rep>;
template<Representation Rep = double>
using ueV = units::isq::si::hep::energy<units::isq::si::hep::ueV, Rep>;
template<Representation Rep = double>
using meV = units::isq::si::hep::energy<units::isq::si::hep::meV, Rep>;
template<Representation Rep = double> using eV = units::isq::si::hep::energy<units::isq::si::hep::eV, Rep>;
template<Representation Rep = double>
using eV = units::isq::si::hep::energy<units::isq::si::hep::eV, Rep>;
template<Representation Rep = double> using keV = units::isq::si::hep::energy<units::isq::si::hep::keV, Rep>;
template<Representation Rep = double> using MeV = units::isq::si::hep::energy<units::isq::si::hep::MeV, Rep>;
template<Representation Rep = double> using GeV = units::isq::si::hep::energy<units::isq::si::hep::GeV, Rep>;
template<Representation Rep = double> using TeV = units::isq::si::hep::energy<units::isq::si::hep::TeV, Rep>;
template<Representation Rep = double> using PeV = units::isq::si::hep::energy<units::isq::si::hep::PeV, Rep>;
template<Representation Rep = double> using EeV = units::isq::si::hep::energy<units::isq::si::hep::EeV, Rep>;
template<Representation Rep = double> using ZeV = units::isq::si::hep::energy<units::isq::si::hep::ZeV, Rep>;
template<Representation Rep = double> using YeV = units::isq::si::hep::energy<units::isq::si::hep::YeV, Rep>;
template<Representation Rep = double>
using keV = units::isq::si::hep::energy<units::isq::si::hep::keV, Rep>;
template<Representation Rep = double>
using MeV = units::isq::si::hep::energy<units::isq::si::hep::MeV, Rep>;
template<Representation Rep = double>
using GeV = units::isq::si::hep::energy<units::isq::si::hep::GeV, Rep>;
template<Representation Rep = double>
using TeV = units::isq::si::hep::energy<units::isq::si::hep::TeV, Rep>;
template<Representation Rep = double>
using PeV = units::isq::si::hep::energy<units::isq::si::hep::PeV, Rep>;
template<Representation Rep = double>
using EeV = units::isq::si::hep::energy<units::isq::si::hep::EeV, Rep>;
template<Representation Rep = double>
using ZeV = units::isq::si::hep::energy<units::isq::si::hep::ZeV, Rep>;
template<Representation Rep = double>
using YeV = units::isq::si::hep::energy<units::isq::si::hep::YeV, Rep>;
} // namespace units::aliases::isq::si::hep::inline energy
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -34,22 +34,29 @@
namespace units::isq::si::hep {
struct eV_per_c2 : named_scaled_unit<eV_per_c2, basic_symbol_text{"eV/c²", "eV/c^2"}, prefix, ratio(1'7826'619'216'279, 1'000'000'000'000, -35), kilogram> {};
struct eV_per_c2 :
named_scaled_unit<eV_per_c2, basic_symbol_text{"eV/c²", "eV/c^2"}, prefix,
ratio(1'7826'619'216'279, 1'000'000'000'000, -35), kilogram> {};
struct feV_per_c2 : prefixed_unit<feV_per_c2, femto, eV_per_c2> {};
struct peV_per_c2 : prefixed_unit<peV_per_c2, pico, eV_per_c2> {};
struct neV_per_c2 : prefixed_unit<neV_per_c2, nano, eV_per_c2> {};
struct ueV_per_c2 : prefixed_unit<ueV_per_c2, micro, eV_per_c2> {};
struct meV_per_c2 : prefixed_unit<meV_per_c2, milli, eV_per_c2> {}; // approximate mass of an electron/positron (0.511 MeV/c2)
struct meV_per_c2 :
prefixed_unit<meV_per_c2, milli, eV_per_c2> {}; // approximate mass of an electron/positron (0.511 MeV/c2)
struct keV_per_c2 : prefixed_unit<keV_per_c2, kilo, eV_per_c2> {};
struct MeV_per_c2 : prefixed_unit<MeV_per_c2, mega, eV_per_c2> {};
struct GeV_per_c2 : prefixed_unit<GeV_per_c2, giga, eV_per_c2> {}; // approximate mass of a proton (0.938 GeV/c2) or neutron
struct GeV_per_c2 :
prefixed_unit<GeV_per_c2, giga, eV_per_c2> {}; // approximate mass of a proton (0.938 GeV/c2) or neutron
struct TeV_per_c2 : prefixed_unit<TeV_per_c2, tera, eV_per_c2> {};
struct PeV_per_c2 : prefixed_unit<PeV_per_c2, peta, eV_per_c2> {};
struct EeV_per_c2 : prefixed_unit<EeV_per_c2, exa, eV_per_c2> {};
struct YeV_per_c2 : prefixed_unit<YeV_per_c2, yotta, eV_per_c2> {};
struct electron_mass : named_scaled_unit<eV_per_c2, "m_e", prefix, ratio(9'109'383'701'528, 1'000'000'000'000, -31), kilogram> {};
struct proton_mass : named_scaled_unit<eV_per_c2, "m_p", prefix, ratio(1'672'621'923'695, 1'000'000'000'000, -27), kilogram> {};
struct neutron_mass : named_scaled_unit<eV_per_c2, "m_n", prefix, ratio(1'674'927'498'049, 1'000'000'000'000, -27), kilogram> {};
struct electron_mass :
named_scaled_unit<eV_per_c2, "m_e", prefix, ratio(9'109'383'701'528, 1'000'000'000'000, -31), kilogram> {};
struct proton_mass :
named_scaled_unit<eV_per_c2, "m_p", prefix, ratio(1'672'621'923'695, 1'000'000'000'000, -27), kilogram> {};
struct neutron_mass :
named_scaled_unit<eV_per_c2, "m_n", prefix, ratio(1'674'927'498'049, 1'000'000'000'000, -27), kilogram> {};
struct dim_mass : isq::dim_mass<eV_per_c2> {};
@@ -59,46 +66,110 @@ using mass = quantity<dim_mass, U, Rep>;
#ifndef UNITS_NO_LITERALS
inline namespace literals {
constexpr auto operator"" _q_feV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<feV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_feV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<feV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_feV_per_c2(long double l) { return mass<feV_per_c2, long double>(l); }
constexpr auto operator"" _q_peV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<peV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_peV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<peV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_peV_per_c2(long double l) { return mass<peV_per_c2, long double>(l); }
constexpr auto operator"" _q_neV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<neV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_neV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<neV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_neV_per_c2(long double l) { return mass<neV_per_c2, long double>(l); }
constexpr auto operator"" _q_ueV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<ueV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ueV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<ueV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ueV_per_c2(long double l) { return mass<ueV_per_c2, long double>(l); }
constexpr auto operator"" _q_meV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<meV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_meV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<meV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_meV_per_c2(long double l) { return mass<meV_per_c2, long double>(l); }
// eV_per_c2
constexpr auto operator"" _q_eV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<eV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_eV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<eV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_eV_per_c2(long double l) { return mass<eV_per_c2, long double>(l); }
constexpr auto operator"" _q_keV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<keV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_keV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<keV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_keV_per_c2(long double l) { return mass<keV_per_c2, long double>(l); }
constexpr auto operator"" _q_MeV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<MeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MeV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<MeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MeV_per_c2(long double l) { return mass<MeV_per_c2, long double>(l); }
constexpr auto operator"" _q_GeV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<GeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GeV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<GeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GeV_per_c2(long double l) { return mass<GeV_per_c2, long double>(l); }
constexpr auto operator"" _q_TeV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<TeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TeV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<TeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TeV_per_c2(long double l) { return mass<TeV_per_c2, long double>(l); }
constexpr auto operator"" _q_PeV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<PeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PeV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<PeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PeV_per_c2(long double l) { return mass<PeV_per_c2, long double>(l); }
constexpr auto operator"" _q_EeV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<EeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EeV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<EeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EeV_per_c2(long double l) { return mass<EeV_per_c2, long double>(l); }
constexpr auto operator"" _q_YeV_per_c2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<YeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YeV_per_c2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<YeV_per_c2, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YeV_per_c2(long double l) { return mass<YeV_per_c2, long double>(l); }
// special HEP masses
constexpr auto operator"" _q_electron_mass(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<electron_mass, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_electron_mass(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<electron_mass, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_electron_mass(long double l) { return mass<electron_mass, long double>(l); }
constexpr auto operator"" _q_proton_mass(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<proton_mass, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_proton_mass(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<proton_mass, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_proton_mass(long double l) { return mass<proton_mass, long double>(l); }
constexpr auto operator"" _q_neutron_mass(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<neutron_mass, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_neutron_mass(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<neutron_mass, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_neutron_mass(long double l) { return mass<neutron_mass, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -114,7 +185,7 @@ using namespace mass_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::hep
@@ -122,8 +193,9 @@ using namespace mass_references;
namespace units::aliases::isq::si::hep::inline mass {
template<Representation Rep = double> using eV_per_c2g = units::isq::si::hep::mass<units::isq::si::hep::eV_per_c2, Rep>;
template<Representation Rep = double>
using eV_per_c2g = units::isq::si::hep::mass<units::isq::si::hep::eV_per_c2, Rep>;
} // namespace units::aliases::isq::si::hep::inline mass
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -35,7 +35,9 @@
namespace units::isq::si::hep {
struct eV_per_c : named_scaled_unit<eV_per_c, "eV/c", prefix, ratio(5'344'285'992'678, 1'000'000'000'000, -35), ::units::isq::si::kilogram_metre_per_second> {};
struct eV_per_c :
named_scaled_unit<eV_per_c, "eV/c", prefix, ratio(5'344'285'992'678, 1'000'000'000'000, -35),
::units::isq::si::kilogram_metre_per_second> {};
struct feV_per_c : prefixed_unit<feV_per_c, femto, eV_per_c> {};
struct peV_per_c : prefixed_unit<peV_per_c, pico, eV_per_c> {};
struct neV_per_c : prefixed_unit<neV_per_c, nano, eV_per_c> {};
@@ -58,48 +60,101 @@ using momentum = quantity<dim_momentum, U, Rep>;
inline namespace literals {
constexpr auto operator"" _q_feV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<feV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_feV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<feV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_feV_per_c(long double l) { return momentum<feV_per_c, long double>(l); }
constexpr auto operator"" _q_peV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<peV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_peV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<peV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_peV_per_c(long double l) { return momentum<peV_per_c, long double>(l); }
constexpr auto operator"" _q_neV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<neV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_neV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<neV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_neV_per_c(long double l) { return momentum<neV_per_c, long double>(l); }
constexpr auto operator"" _q_ueV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<ueV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ueV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<ueV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ueV_per_c(long double l) { return momentum<ueV_per_c, long double>(l); }
constexpr auto operator"" _q_meV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<meV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_meV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<meV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_meV_per_c(long double l) { return momentum<meV_per_c, long double>(l); }
// eV_per_c
constexpr auto operator"" _q_eV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<eV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_eV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<eV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_eV_per_c(long double l) { return momentum<eV_per_c, long double>(l); }
constexpr auto operator"" _q_keV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<keV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_keV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<keV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_keV_per_c(long double l) { return momentum<keV_per_c, long double>(l); }
constexpr auto operator"" _q_MeV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<MeV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MeV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<MeV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MeV_per_c(long double l) { return momentum<MeV_per_c, long double>(l); }
constexpr auto operator"" _q_GeV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<GeV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GeV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<GeV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GeV_per_c(long double l) { return momentum<GeV_per_c, long double>(l); }
constexpr auto operator"" _q_TeV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<TeV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TeV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<TeV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TeV_per_c(long double l) { return momentum<TeV_per_c, long double>(l); }
constexpr auto operator"" _q_PeV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<PeV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PeV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<PeV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PeV_per_c(long double l) { return momentum<PeV_per_c, long double>(l); }
constexpr auto operator"" _q_EeV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<EeV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EeV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<EeV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EeV_per_c(long double l) { return momentum<EeV_per_c, long double>(l); }
constexpr auto operator"" _q_YeV_per_c(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<YeV_per_c, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YeV_per_c(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<YeV_per_c, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YeV_per_c(long double l) { return momentum<YeV_per_c, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
} // namespace units::isq::si::hep
#ifndef UNITS_NO_ALIASES
namespace units::aliases::isq::si::inline momentum {
template<Representation Rep = double> using eV_per_c = units::isq::si::hep::momentum<units::isq::si::hep::eV_per_c, Rep>;
template<Representation Rep = double>
using eV_per_c = units::isq::si::hep::momentum<units::isq::si::hep::eV_per_c, Rep>;
} // namespace units::aliases::isq::si::inline momentum
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -49,20 +49,32 @@ struct angstrom : named_scaled_unit<angstrom, "angstrom", no_prefix, ratio(1, 1,
inline namespace literals {
// ly
constexpr auto operator"" _q_ly(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<light_year, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ly(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<light_year, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ly(long double l) { return si::length<light_year, long double>(l); }
// pc
constexpr auto operator"" _q_pc(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<parsec, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pc(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<parsec, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pc(long double l) { return si::length<parsec, long double>(l); }
// angstrom
constexpr auto operator"" _q_angstrom(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<angstrom, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_angstrom(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<angstrom, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_angstrom(long double l) { return si::length<angstrom, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -80,7 +92,7 @@ using namespace length_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::iau
@@ -88,10 +100,13 @@ using namespace length_references;
namespace units::aliases::isq::si::iau::inline length {
template<Representation Rep = double> using ly = units::isq::si::length<units::isq::si::iau::light_year, Rep>;
template<Representation Rep = double> using pc = units::isq::si::length<units::isq::si::iau::parsec, Rep>;
template<Representation Rep = double> using angstrom = units::isq::si::length<units::isq::si::iau::angstrom, Rep>;
template<Representation Rep = double>
using ly = units::isq::si::length<units::isq::si::iau::light_year, Rep>;
template<Representation Rep = double>
using pc = units::isq::si::length<units::isq::si::iau::parsec, Rep>;
template<Representation Rep = double>
using angstrom = units::isq::si::length<units::isq::si::iau::angstrom, Rep>;
} // namespace units::aliases::isq::si::iau
} // namespace units::aliases::isq::si::iau::inline length
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -45,16 +45,24 @@ struct rod : named_scaled_unit<rod, "rd", no_prefix, ratio(1, 4), chain> {};
inline namespace literals {
// ch
constexpr auto operator"" _q_ch(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<chain, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ch(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<chain, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ch(long double l) { return si::length<chain, long double>(l); }
// rd
constexpr auto operator"" _q_rd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<rod, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_rd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<rod, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_rd(long double l) { return si::length<rod, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -71,7 +79,7 @@ using namespace length_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::imperial
@@ -79,9 +87,11 @@ using namespace length_references;
namespace units::aliases::isq::si::imperial::inline length {
template<Representation Rep = double> using ch = units::isq::si::length<units::isq::si::imperial::chain, Rep>;
template<Representation Rep = double> using rd = units::isq::si::length<units::isq::si::imperial::rod, Rep>;
template<Representation Rep = double>
using ch = units::isq::si::length<units::isq::si::imperial::chain, Rep>;
template<Representation Rep = double>
using rd = units::isq::si::length<units::isq::si::imperial::rod, Rep>;
} // namespace units::aliases::isq::si::imperial::inline length
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -71,40 +71,72 @@ using mil = thou;
inline namespace literals {
// yd
constexpr auto operator"" _q_yd(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<yard, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yd(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<yard, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yd(long double l) { return si::length<yard, long double>(l); }
// ft
constexpr auto operator"" _q_ft(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<foot, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ft(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<foot, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ft(long double l) { return si::length<foot, long double>(l); }
// fathom
constexpr auto operator"" _q_fathom(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<fathom, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fathom(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<fathom, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fathom(long double l) { return si::length<fathom, long double>(l); }
// in
constexpr auto operator"" _q_in(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<inch, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_in(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<inch, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_in(long double l) { return si::length<inch, long double>(l); }
// mi
constexpr auto operator"" _q_mi(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<mile, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mi(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<mile, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mi(long double l) { return si::length<mile, long double>(l); }
// mi_naut
constexpr auto operator"" _q_naut_mi(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<nautical_mile, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_naut_mi(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<nautical_mile, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_naut_mi(long double l) { return si::length<nautical_mile, long double>(l); }
// thou
constexpr auto operator"" _q_thou(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<thou, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_thou(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<thou, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_thou(long double l) { return si::length<thou, long double>(l); }
// mil
constexpr auto operator"" _q_mil(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<mil, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mil(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<mil, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mil(long double l) { return si::length<mil, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -127,7 +159,7 @@ using namespace length_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::international
@@ -135,15 +167,23 @@ using namespace length_references;
namespace units::aliases::isq::si::international::inline length {
template<Representation Rep = double> using yd = units::isq::si::length<units::isq::si::international::yard, Rep>;
template<Representation Rep = double> using ft = units::isq::si::length<units::isq::si::international::foot, Rep>;
template<Representation Rep = double> using fathom = units::isq::si::length<units::isq::si::international::fathom, Rep>;
template<Representation Rep = double> using in = units::isq::si::length<units::isq::si::international::inch, Rep>;
template<Representation Rep = double> using mi = units::isq::si::length<units::isq::si::international::mile, Rep>;
template<Representation Rep = double> using mi_naut = units::isq::si::length<units::isq::si::international::nautical_mile, Rep>;
template<Representation Rep = double> using thou = units::isq::si::length<units::isq::si::international::thou, Rep>;
template<Representation Rep = double> using mil = units::isq::si::length<units::isq::si::international::mil, Rep>;
template<Representation Rep = double>
using yd = units::isq::si::length<units::isq::si::international::yard, Rep>;
template<Representation Rep = double>
using ft = units::isq::si::length<units::isq::si::international::foot, Rep>;
template<Representation Rep = double>
using fathom = units::isq::si::length<units::isq::si::international::fathom, Rep>;
template<Representation Rep = double>
using in = units::isq::si::length<units::isq::si::international::inch, Rep>;
template<Representation Rep = double>
using mi = units::isq::si::length<units::isq::si::international::mile, Rep>;
template<Representation Rep = double>
using mi_naut = units::isq::si::length<units::isq::si::international::nautical_mile, Rep>;
template<Representation Rep = double>
using thou = units::isq::si::length<units::isq::si::international::thou, Rep>;
template<Representation Rep = double>
using mil = units::isq::si::length<units::isq::si::international::mil, Rep>;
} // namespace units::aliases::isq::si::international::inline length
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -41,12 +41,16 @@ struct mile_per_hour : derived_unit<mile_per_hour, si::dim_speed, si::internatio
inline namespace literals {
// mi/h
constexpr auto operator"" _q_mi_per_h(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::speed<mile_per_hour, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mi_per_h(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::speed<mile_per_hour, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mi_per_h(long double l) { return si::speed<mile_per_hour, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si::international
@@ -54,8 +58,9 @@ constexpr auto operator"" _q_mi_per_h(long double l) { return si::speed<mile_per
namespace units::aliases::isq::si::international::inline speed {
template<Representation Rep = double> using mi_per_h = units::isq::si::speed<units::isq::si::international::mile_per_hour, Rep>;
template<Representation Rep = double>
using mi_per_h = units::isq::si::speed<units::isq::si::international::mile_per_hour, Rep>;
} // namespace units::aliases::isq::si::international::inline speed
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -42,12 +42,16 @@ struct cubic_foot : derived_unit<cubic_foot, si::dim_volume, si::international::
inline namespace literals {
// ft3
constexpr auto operator"" _q_ft3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::volume<cubic_foot, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ft3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::volume<cubic_foot, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ft3(long double l) { return si::volume<cubic_foot, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -63,7 +67,7 @@ using namespace volume_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::international
@@ -71,8 +75,9 @@ using namespace volume_references;
namespace units::aliases::isq::si::international::inline volume {
template<Representation Rep = double> using ft3 = units::isq::si::volume<units::isq::si::international::cubic_foot, Rep>;
template<Representation Rep = double>
using ft3 = units::isq::si::volume<units::isq::si::international::cubic_foot, Rep>;
} // namespace units::aliases::isq::si::international::inline volume
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -35,7 +35,8 @@
namespace units::isq::si::typographic {
// TODO Conflicts with (https://en.wikipedia.org/wiki/Pica_(typography)), verify correctness of below conversion factors and provide hyperlinks to definitions
// 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> {};
struct pica_prn : named_scaled_unit<pica_prn, "pica(prn)", no_prefix, ratio(2108759, 500000, -3), si::metre> {};
struct point_comp : named_scaled_unit<point_comp, "point(comp)", no_prefix, ratio(1763889, 500000, -4), si::metre> {};
@@ -46,24 +47,40 @@ struct point_prn : named_scaled_unit<point_prn, "point(prn)", no_prefix, ratio(1
inline namespace literals {
// pica comp
constexpr auto operator"" _q_pica_comp(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<pica_comp, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pica_comp(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<pica_comp, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pica_comp(long double l) { return si::length<pica_comp, long double>(l); }
// pica prn
constexpr auto operator"" _q_pica_prn(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<pica_prn, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pica_prn(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<pica_prn, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pica_prn(long double l) { return si::length<pica_prn, long double>(l); }
// point comp
constexpr auto operator"" _q_point_comp(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<point_comp, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_point_comp(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<point_comp, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_point_comp(long double l) { return si::length<point_comp, long double>(l); }
// point prn
constexpr auto operator"" _q_point_prn(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<point_prn, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_point_prn(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<point_prn, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_point_prn(long double l) { return si::length<point_prn, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -82,7 +99,7 @@ using namespace length_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::typographic
@@ -90,11 +107,15 @@ using namespace length_references;
namespace units::aliases::isq::si::typographic::inline length {
template<Representation Rep = double> using pica_comp = units::isq::si::length<units::isq::si::typographic::pica_comp, Rep>;
template<Representation Rep = double> using pica_prn = units::isq::si::length<units::isq::si::typographic::pica_prn, Rep>;
template<Representation Rep = double> using point_comp = units::isq::si::length<units::isq::si::typographic::point_comp, Rep>;
template<Representation Rep = double> using point_prn = units::isq::si::length<units::isq::si::typographic::point_prn, Rep>;
template<Representation Rep = double>
using pica_comp = units::isq::si::length<units::isq::si::typographic::pica_comp, Rep>;
template<Representation Rep = double>
using pica_prn = units::isq::si::length<units::isq::si::typographic::pica_prn, Rep>;
template<Representation Rep = double>
using point_comp = units::isq::si::length<units::isq::si::typographic::point_comp, Rep>;
template<Representation Rep = double>
using point_prn = units::isq::si::length<units::isq::si::typographic::point_prn, Rep>;
} // namespace units::aliases::isq::si::typographic::inline length
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -50,20 +50,35 @@ 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) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<units::isq::si::uscs::foot, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ft_us(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<units::isq::si::uscs::foot, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ft_us(long double l) { return si::length<units::isq::si::uscs::foot, long double>(l); }
// fathom
constexpr auto operator"" _q_fathom_us(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<units::isq::si::uscs::fathom, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fathom_us(long double l) { return si::length<units::isq::si::uscs::fathom, long double>(l); }
constexpr auto operator"" _q_fathom_us(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<units::isq::si::uscs::fathom, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fathom_us(long double l)
{
return si::length<units::isq::si::uscs::fathom, long double>(l);
}
// mi
constexpr auto operator"" _q_mi_us(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return si::length<units::isq::si::uscs::mile, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mi_us(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return si::length<units::isq::si::uscs::mile, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mi_us(long double l) { return si::length<units::isq::si::uscs::mile, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -81,7 +96,7 @@ using namespace length_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si::uscs
@@ -89,10 +104,13 @@ using namespace length_references;
namespace units::aliases::isq::si::uscs::inline length {
template<Representation Rep = double> using ft = units::isq::si::length<units::isq::si::uscs::foot, Rep>;
template<Representation Rep = double> using fathom = units::isq::si::length<units::isq::si::uscs::fathom, Rep>;
template<Representation Rep = double> using mi = units::isq::si::length<units::isq::si::uscs::mile, Rep>;
template<Representation Rep = double>
using ft = units::isq::si::length<units::isq::si::uscs::foot, Rep>;
template<Representation Rep = double>
using fathom = units::isq::si::length<units::isq::si::uscs::fathom, Rep>;
template<Representation Rep = double>
using mi = units::isq::si::length<units::isq::si::uscs::mile, Rep>;
} // namespace units::aliases::isq::si::uscs::inline length
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -30,8 +30,8 @@
// IWYU pragma: end_exports
#include <units/isq/si/amount_of_substance.h>
#include <units/isq/si/time.h>
#include <units/isq/si/prefixes.h>
#include <units/isq/si/time.h>
#include <units/unit.h>
namespace units::isq::si {
@@ -60,7 +60,8 @@ struct yottakatal : prefixed_unit<yottakatal, yotta, katal> {};
struct enzyme_unit : named_scaled_unit<enzyme_unit, "U", prefix, ratio(1, 60, -6), katal> {};
struct dim_catalytic_activity : isq::dim_catalytic_activity<dim_catalytic_activity, katal, dim_time, dim_amount_of_substance> {};
struct dim_catalytic_activity :
isq::dim_catalytic_activity<dim_catalytic_activity, katal, dim_time, dim_amount_of_substance> {};
template<UnitOf<dim_catalytic_activity> U, Representation Rep = double>
using catalytic_activity = quantity<dim_catalytic_activity, U, Rep>;
@@ -70,96 +71,184 @@ using catalytic_activity = quantity<dim_catalytic_activity, U, Rep>;
inline namespace literals {
// kat
constexpr auto operator"" _q_kat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<katal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<katal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kat(long double l) { return catalytic_activity<katal, long double>(l); }
// ykat
constexpr auto operator"" _q_ykat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<yoctokatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ykat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<yoctokatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ykat(long double l) { return catalytic_activity<yoctokatal, long double>(l); }
// zkat
constexpr auto operator"" _q_zkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<zeptokatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<zeptokatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zkat(long double l) { return catalytic_activity<zeptokatal, long double>(l); }
// akat
constexpr auto operator"" _q_akat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<attokatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_akat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<attokatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_akat(long double l) { return catalytic_activity<attokatal, long double>(l); }
// fkat
constexpr auto operator"" _q_fkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<femtokatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<femtokatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fkat(long double l) { return catalytic_activity<femtokatal, long double>(l); }
// pkat
constexpr auto operator"" _q_pkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<picokatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<picokatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pkat(long double l) { return catalytic_activity<picokatal, long double>(l); }
// nkat
constexpr auto operator"" _q_nkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<nanokatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<nanokatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nkat(long double l) { return catalytic_activity<nanokatal, long double>(l); }
// ukat
constexpr auto operator"" _q_ukat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<microkatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ukat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<microkatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ukat(long double l) { return catalytic_activity<microkatal, long double>(l); }
// mkat
constexpr auto operator"" _q_mkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<millikatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<millikatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mkat(long double l) { return catalytic_activity<millikatal, long double>(l); }
// ckat
constexpr auto operator"" _q_ckat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<centikatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ckat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<centikatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ckat(long double l) { return catalytic_activity<centikatal, long double>(l); }
// dkat
constexpr auto operator"" _q_dkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<decikatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<decikatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dkat(long double l) { return catalytic_activity<decikatal, long double>(l); }
// dakat
constexpr auto operator"" _q_dakat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<decakatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dakat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<decakatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dakat(long double l) { return catalytic_activity<decakatal, long double>(l); }
// hkat
constexpr auto operator"" _q_hkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<hectokatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_hkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<hectokatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_hkat(long double l) { return catalytic_activity<hectokatal, long double>(l); }
// kkat
constexpr auto operator"" _q_kkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<kilokatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<kilokatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kkat(long double l) { return catalytic_activity<kilokatal, long double>(l); }
// Mkat
constexpr auto operator"" _q_Mkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<megakatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Mkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<megakatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Mkat(long double l) { return catalytic_activity<megakatal, long double>(l); }
// Gkat
constexpr auto operator"" _q_Gkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<gigakatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Gkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<gigakatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Gkat(long double l) { return catalytic_activity<gigakatal, long double>(l); }
// Tkat
constexpr auto operator"" _q_Tkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<terakatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Tkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<terakatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Tkat(long double l) { return catalytic_activity<terakatal, long double>(l); }
// Pkat
constexpr auto operator"" _q_Pkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<petakatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Pkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<petakatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Pkat(long double l) { return catalytic_activity<petakatal, long double>(l); }
// Ekat
constexpr auto operator"" _q_Ekat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<exakatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Ekat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<exakatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Ekat(long double l) { return catalytic_activity<exakatal, long double>(l); }
// Zkat
constexpr auto operator"" _q_Zkat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<zettakatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Zkat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<zettakatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Zkat(long double l) { return catalytic_activity<zettakatal, long double>(l); }
// Ykat
constexpr auto operator"" _q_Ykat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<yottakatal, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Ykat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<yottakatal, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Ykat(long double l) { return catalytic_activity<yottakatal, long double>(l); }
// U
constexpr auto operator"" _q_U(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return catalytic_activity<enzyme_unit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_U(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return catalytic_activity<enzyme_unit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_U(long double l) { return catalytic_activity<enzyme_unit, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -196,7 +285,7 @@ using namespace catalytic_activity_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -204,29 +293,51 @@ using namespace catalytic_activity_references;
namespace units::aliases::isq::si::inline catalytic_activity {
template<Representation Rep = double> using kat = units::isq::si::catalytic_activity<units::isq::si::katal, Rep>;
template<Representation Rep = double> using ykat = units::isq::si::catalytic_activity<units::isq::si::yoctokatal, Rep>;
template<Representation Rep = double> using zkat = units::isq::si::catalytic_activity<units::isq::si::zeptokatal, Rep>;
template<Representation Rep = double> using akat = units::isq::si::catalytic_activity<units::isq::si::attokatal, Rep>;
template<Representation Rep = double> using fkat = units::isq::si::catalytic_activity<units::isq::si::femtokatal, Rep>;
template<Representation Rep = double> using pkat = units::isq::si::catalytic_activity<units::isq::si::picokatal, Rep>;
template<Representation Rep = double> using nkat = units::isq::si::catalytic_activity<units::isq::si::nanokatal, Rep>;
template<Representation Rep = double> using ukat = units::isq::si::catalytic_activity<units::isq::si::microkatal, Rep>;
template<Representation Rep = double> using mkat = units::isq::si::catalytic_activity<units::isq::si::millikatal, Rep>;
template<Representation Rep = double> using ckat = units::isq::si::catalytic_activity<units::isq::si::centikatal, Rep>;
template<Representation Rep = double> using dkat = units::isq::si::catalytic_activity<units::isq::si::decikatal, Rep>;
template<Representation Rep = double> using dakat = units::isq::si::catalytic_activity<units::isq::si::decakatal, Rep>;
template<Representation Rep = double> using hkat = units::isq::si::catalytic_activity<units::isq::si::hectokatal, Rep>;
template<Representation Rep = double> using kkat = units::isq::si::catalytic_activity<units::isq::si::kilokatal, Rep>;
template<Representation Rep = double> using Mkat = units::isq::si::catalytic_activity<units::isq::si::megakatal, Rep>;
template<Representation Rep = double> using Gkat = units::isq::si::catalytic_activity<units::isq::si::gigakatal, Rep>;
template<Representation Rep = double> using Tkat = units::isq::si::catalytic_activity<units::isq::si::terakatal, Rep>;
template<Representation Rep = double> using Pkat = units::isq::si::catalytic_activity<units::isq::si::petakatal, Rep>;
template<Representation Rep = double> using Ekat = units::isq::si::catalytic_activity<units::isq::si::exakatal, Rep>;
template<Representation Rep = double> using Zkat = units::isq::si::catalytic_activity<units::isq::si::zettakatal, Rep>;
template<Representation Rep = double> using Ykat = units::isq::si::catalytic_activity<units::isq::si::yottakatal, Rep>;
template<Representation Rep = double> using U = units::isq::si::catalytic_activity<units::isq::si::enzyme_unit, Rep>;
template<Representation Rep = double>
using kat = units::isq::si::catalytic_activity<units::isq::si::katal, Rep>;
template<Representation Rep = double>
using ykat = units::isq::si::catalytic_activity<units::isq::si::yoctokatal, Rep>;
template<Representation Rep = double>
using zkat = units::isq::si::catalytic_activity<units::isq::si::zeptokatal, Rep>;
template<Representation Rep = double>
using akat = units::isq::si::catalytic_activity<units::isq::si::attokatal, Rep>;
template<Representation Rep = double>
using fkat = units::isq::si::catalytic_activity<units::isq::si::femtokatal, Rep>;
template<Representation Rep = double>
using pkat = units::isq::si::catalytic_activity<units::isq::si::picokatal, Rep>;
template<Representation Rep = double>
using nkat = units::isq::si::catalytic_activity<units::isq::si::nanokatal, Rep>;
template<Representation Rep = double>
using ukat = units::isq::si::catalytic_activity<units::isq::si::microkatal, Rep>;
template<Representation Rep = double>
using mkat = units::isq::si::catalytic_activity<units::isq::si::millikatal, Rep>;
template<Representation Rep = double>
using ckat = units::isq::si::catalytic_activity<units::isq::si::centikatal, Rep>;
template<Representation Rep = double>
using dkat = units::isq::si::catalytic_activity<units::isq::si::decikatal, Rep>;
template<Representation Rep = double>
using dakat = units::isq::si::catalytic_activity<units::isq::si::decakatal, Rep>;
template<Representation Rep = double>
using hkat = units::isq::si::catalytic_activity<units::isq::si::hectokatal, Rep>;
template<Representation Rep = double>
using kkat = units::isq::si::catalytic_activity<units::isq::si::kilokatal, Rep>;
template<Representation Rep = double>
using Mkat = units::isq::si::catalytic_activity<units::isq::si::megakatal, Rep>;
template<Representation Rep = double>
using Gkat = units::isq::si::catalytic_activity<units::isq::si::gigakatal, Rep>;
template<Representation Rep = double>
using Tkat = units::isq::si::catalytic_activity<units::isq::si::terakatal, Rep>;
template<Representation Rep = double>
using Pkat = units::isq::si::catalytic_activity<units::isq::si::petakatal, Rep>;
template<Representation Rep = double>
using Ekat = units::isq::si::catalytic_activity<units::isq::si::exakatal, Rep>;
template<Representation Rep = double>
using Zkat = units::isq::si::catalytic_activity<units::isq::si::zettakatal, Rep>;
template<Representation Rep = double>
using Ykat = units::isq::si::catalytic_activity<units::isq::si::yottakatal, Rep>;
template<Representation Rep = double>
using U = units::isq::si::catalytic_activity<units::isq::si::enzyme_unit, Rep>;
} // namespace units::aliases::isq::si::inline catalytic_activity
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -38,8 +38,11 @@ namespace units::isq::si {
struct coulomb_per_metre_cub : unit<coulomb_per_metre_cub> {};
struct coulomb_per_metre_sq : unit<coulomb_per_metre_sq> {};
struct dim_charge_density : isq::dim_charge_density<dim_charge_density, coulomb_per_metre_cub, dim_electric_charge, dim_length> {};
struct dim_surface_charge_density : isq::dim_surface_charge_density<dim_surface_charge_density, coulomb_per_metre_sq, dim_electric_charge, dim_length> {};
struct dim_charge_density :
isq::dim_charge_density<dim_charge_density, coulomb_per_metre_cub, dim_electric_charge, dim_length> {};
struct dim_surface_charge_density :
isq::dim_surface_charge_density<dim_surface_charge_density, coulomb_per_metre_sq, dim_electric_charge, dim_length> {
};
template<UnitOf<dim_charge_density> U, Representation Rep = double>
using charge_density = quantity<dim_charge_density, U, Rep>;
@@ -52,16 +55,27 @@ using surface_charge_density = quantity<dim_surface_charge_density, U, Rep>;
inline namespace literals {
// C/m³
constexpr auto operator"" _q_C_per_m3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return charge_density<coulomb_per_metre_cub, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_C_per_m3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return charge_density<coulomb_per_metre_cub, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_C_per_m3(long double l) { return charge_density<coulomb_per_metre_cub, long double>(l); }
// C/m²
constexpr auto operator"" _q_C_per_m2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return surface_charge_density<coulomb_per_metre_sq, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_C_per_m2(long double l) { return surface_charge_density<coulomb_per_metre_sq, long double>(l); }
constexpr auto operator"" _q_C_per_m2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return surface_charge_density<coulomb_per_metre_sq, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_C_per_m2(long double l)
{
return surface_charge_density<coulomb_per_metre_sq, long double>(l);
}
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -69,9 +83,11 @@ constexpr auto operator"" _q_C_per_m2(long double l) { return surface_charge_den
namespace units::aliases::isq::si::inline charge_density {
template<Representation Rep = double> using C_per_m3 = units::isq::si::charge_density<units::isq::si::coulomb_per_metre_cub, Rep>;
template<Representation Rep = double> using C_per_m2 = units::isq::si::surface_charge_density<units::isq::si::coulomb_per_metre_sq, Rep>;
template<Representation Rep = double>
using C_per_m3 = units::isq::si::charge_density<units::isq::si::coulomb_per_metre_cub, Rep>;
template<Representation Rep = double>
using C_per_m2 = units::isq::si::surface_charge_density<units::isq::si::coulomb_per_metre_sq, Rep>;
} // namespace units::aliases::isq::si::inline charge_density
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -23,12 +23,12 @@
#pragma once
#include <units/isq/si/amount_of_substance.h>
#include <units/isq/si/thermodynamic_temperature.h>
#include <units/isq/si/electric_charge.h>
#include <units/isq/si/energy.h>
#include <units/isq/si/frequency.h>
#include <units/isq/si/power.h>
#include <units/isq/si/speed.h>
#include <units/isq/si/thermodynamic_temperature.h>
namespace units::isq::si::si2019 {
@@ -37,7 +37,8 @@ namespace units::isq::si {
struct ampere_per_metre_sq : unit<ampere_per_metre_sq> {};
struct dim_current_density : isq::dim_current_density<dim_current_density, ampere_per_metre_sq, dim_electric_current, dim_length> {};
struct dim_current_density :
isq::dim_current_density<dim_current_density, ampere_per_metre_sq, dim_electric_current, dim_length> {};
template<UnitOf<dim_current_density> U, Representation Rep = double>
using current_density = quantity<dim_current_density, U, Rep>;
@@ -47,12 +48,16 @@ using current_density = quantity<dim_current_density, U, Rep>;
inline namespace literals {
// A / m²
constexpr auto operator"" _q_A_per_m2(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return current_density<ampere_per_metre_sq, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_A_per_m2(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return current_density<ampere_per_metre_sq, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_A_per_m2(long double l) { return current_density<ampere_per_metre_sq, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -60,8 +65,9 @@ constexpr auto operator"" _q_A_per_m2(long double l) { return current_density<am
namespace units::aliases::isq::si::inline current_density {
template<Representation Rep = double> using A_per_m2 = units::isq::si::current_density<units::isq::si::ampere_per_metre_sq, Rep>;
template<Representation Rep = double>
using A_per_m2 = units::isq::si::current_density<units::isq::si::ampere_per_metre_sq, Rep>;
} // namespace units::aliases::isq::si::inline current_density
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -28,14 +28,15 @@
#include <units/symbol_text.h>
// IWYU pragma: end_exports
#include <units/isq/si/time.h>
#include <units/isq/si/pressure.h>
#include <units/isq/si/time.h>
#include <units/unit.h>
namespace units::isq::si {
struct pascal_second : unit<pascal_second> {};
struct dim_dynamic_viscosity : isq::dim_dynamic_viscosity<dim_dynamic_viscosity, pascal_second, dim_pressure, dim_time> {};
struct dim_dynamic_viscosity :
isq::dim_dynamic_viscosity<dim_dynamic_viscosity, pascal_second, dim_pressure, dim_time> {};
template<UnitOf<dim_dynamic_viscosity> U, Representation Rep = double>
using dynamic_viscosity = quantity<dim_dynamic_viscosity, U, Rep>;
@@ -45,12 +46,16 @@ using dynamic_viscosity = quantity<dim_dynamic_viscosity, U, Rep>;
inline namespace literals {
// Pa·s
constexpr auto operator"" _q_Pa_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return dynamic_viscosity<pascal_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Pa_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return dynamic_viscosity<pascal_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Pa_s(long double l) { return dynamic_viscosity<pascal_second, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -58,8 +63,9 @@ constexpr auto operator"" _q_Pa_s(long double l) { return dynamic_viscosity<pasc
namespace units::aliases::isq::si::inline dynamic_viscosity {
template<Representation Rep = double> using Pa_s = units::isq::si::dynamic_viscosity<units::isq::si::pascal_second, Rep>;
template<Representation Rep = double>
using Pa_s = units::isq::si::dynamic_viscosity<units::isq::si::pascal_second, Rep>;
} // namespace units::aliases::isq::si::inline dynamic_viscosity
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -47,12 +47,16 @@ using electric_charge = quantity<dim_electric_charge, U, Rep>;
inline namespace literals {
// C
constexpr auto operator"" _q_C(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_charge<coulomb, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_C(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_charge<coulomb, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_C(long double l) { return electric_charge<coulomb, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -68,7 +72,7 @@ using namespace electric_charge_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -76,8 +80,9 @@ using namespace electric_charge_references;
namespace units::aliases::isq::si::inline electric_charge {
template<Representation Rep = double> using C = units::isq::si::electric_charge<units::isq::si::coulomb, Rep>;
template<Representation Rep = double>
using C = units::isq::si::electric_charge<units::isq::si::coulomb, Rep>;
} // namespace units::aliases::isq::si::inline electric_charge
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -66,92 +66,176 @@ using electric_current = quantity<dim_electric_current, U, Rep>;
inline namespace literals {
// A
constexpr auto operator"" _q_A(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<ampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_A(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<ampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_A(long double l) { return electric_current<ampere, long double>(l); }
// yA
constexpr auto operator"" _q_yA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<yoctoampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<yoctoampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yA(long double l) { return electric_current<yoctoampere, long double>(l); }
// zA
constexpr auto operator"" _q_zA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<zeptoampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<zeptoampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zA(long double l) { return electric_current<zeptoampere, long double>(l); }
// aA
constexpr auto operator"" _q_aA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<attoampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_aA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<attoampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_aA(long double l) { return electric_current<attoampere, long double>(l); }
// fA
constexpr auto operator"" _q_fA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<femtoampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<femtoampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fA(long double l) { return electric_current<femtoampere, long double>(l); }
// pA
constexpr auto operator"" _q_pA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<picoampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<picoampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pA(long double l) { return electric_current<picoampere, long double>(l); }
// nA
constexpr auto operator"" _q_nA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<nanoampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<nanoampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nA(long double l) { return electric_current<nanoampere, long double>(l); }
// uA
constexpr auto operator"" _q_uA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<microampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_uA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<microampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_uA(long double l) { return electric_current<microampere, long double>(l); }
// mA
constexpr auto operator"" _q_mA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<milliampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<milliampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mA(long double l) { return electric_current<milliampere, long double>(l); }
// cA
constexpr auto operator"" _q_cA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<centiampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_cA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<centiampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_cA(long double l) { return electric_current<centiampere, long double>(l); }
// dA
constexpr auto operator"" _q_dA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<deciampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<deciampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dA(long double l) { return electric_current<deciampere, long double>(l); }
// daA
constexpr auto operator"" _q_daA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<decaampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_daA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<decaampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_daA(long double l) { return electric_current<decaampere, long double>(l); }
// hA
constexpr auto operator"" _q_hA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<hectoampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_hA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<hectoampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_hA(long double l) { return electric_current<hectoampere, long double>(l); }
// kA
constexpr auto operator"" _q_kA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<kiloampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<kiloampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kA(long double l) { return electric_current<kiloampere, long double>(l); }
// MA
constexpr auto operator"" _q_MA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<megaampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<megaampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MA(long double l) { return electric_current<megaampere, long double>(l); }
// GA
constexpr auto operator"" _q_GA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<gigaampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<gigaampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GA(long double l) { return electric_current<gigaampere, long double>(l); }
// TA
constexpr auto operator"" _q_TA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<teraampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<teraampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TA(long double l) { return electric_current<teraampere, long double>(l); }
// PA
constexpr auto operator"" _q_PA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<petaampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<petaampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PA(long double l) { return electric_current<petaampere, long double>(l); }
// EA
constexpr auto operator"" _q_EA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<exaampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<exaampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EA(long double l) { return electric_current<exaampere, long double>(l); }
// ZA
constexpr auto operator"" _q_ZA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<zettaampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<zettaampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZA(long double l) { return electric_current<zettaampere, long double>(l); }
// YA
constexpr auto operator"" _q_YA(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_current<yottaampere, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YA(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_current<yottaampere, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YA(long double l) { return electric_current<yottaampere, long double>(l); }
} // namespace literals
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -187,7 +271,7 @@ using namespace electric_current_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -195,28 +279,49 @@ using namespace electric_current_references;
namespace units::aliases::isq::si::inline electric_current {
template<Representation Rep = double> using A = units::isq::si::electric_current<units::isq::si::ampere, Rep>;
template<Representation Rep = double> using yA = units::isq::si::electric_current<units::isq::si::yoctoampere, Rep>;
template<Representation Rep = double> using zA = units::isq::si::electric_current<units::isq::si::zeptoampere, Rep>;
template<Representation Rep = double> using aA = units::isq::si::electric_current<units::isq::si::attoampere, Rep>;
template<Representation Rep = double> using fA = units::isq::si::electric_current<units::isq::si::femtoampere, Rep>;
template<Representation Rep = double> using pA = units::isq::si::electric_current<units::isq::si::picoampere, Rep>;
template<Representation Rep = double> using nA = units::isq::si::electric_current<units::isq::si::nanoampere, Rep>;
template<Representation Rep = double> using uA = units::isq::si::electric_current<units::isq::si::microampere, Rep>;
template<Representation Rep = double> using mA = units::isq::si::electric_current<units::isq::si::milliampere, Rep>;
template<Representation Rep = double> using cA = units::isq::si::electric_current<units::isq::si::centiampere, Rep>;
template<Representation Rep = double> using dA = units::isq::si::electric_current<units::isq::si::deciampere, Rep>;
template<Representation Rep = double> using daA = units::isq::si::electric_current<units::isq::si::decaampere, Rep>;
template<Representation Rep = double> using hA = units::isq::si::electric_current<units::isq::si::hectoampere, Rep>;
template<Representation Rep = double> using kA = units::isq::si::electric_current<units::isq::si::kiloampere, Rep>;
template<Representation Rep = double> using MA = units::isq::si::electric_current<units::isq::si::megaampere, Rep>;
template<Representation Rep = double> using GA = units::isq::si::electric_current<units::isq::si::gigaampere, Rep>;
template<Representation Rep = double> using TA = units::isq::si::electric_current<units::isq::si::teraampere, Rep>;
template<Representation Rep = double> using PA = units::isq::si::electric_current<units::isq::si::petaampere, Rep>;
template<Representation Rep = double> using EA = units::isq::si::electric_current<units::isq::si::exaampere, Rep>;
template<Representation Rep = double> using ZA = units::isq::si::electric_current<units::isq::si::zettaampere, Rep>;
template<Representation Rep = double> using YA = units::isq::si::electric_current<units::isq::si::yottaampere, Rep>;
template<Representation Rep = double>
using A = units::isq::si::electric_current<units::isq::si::ampere, Rep>;
template<Representation Rep = double>
using yA = units::isq::si::electric_current<units::isq::si::yoctoampere, Rep>;
template<Representation Rep = double>
using zA = units::isq::si::electric_current<units::isq::si::zeptoampere, Rep>;
template<Representation Rep = double>
using aA = units::isq::si::electric_current<units::isq::si::attoampere, Rep>;
template<Representation Rep = double>
using fA = units::isq::si::electric_current<units::isq::si::femtoampere, Rep>;
template<Representation Rep = double>
using pA = units::isq::si::electric_current<units::isq::si::picoampere, Rep>;
template<Representation Rep = double>
using nA = units::isq::si::electric_current<units::isq::si::nanoampere, Rep>;
template<Representation Rep = double>
using uA = units::isq::si::electric_current<units::isq::si::microampere, Rep>;
template<Representation Rep = double>
using mA = units::isq::si::electric_current<units::isq::si::milliampere, Rep>;
template<Representation Rep = double>
using cA = units::isq::si::electric_current<units::isq::si::centiampere, Rep>;
template<Representation Rep = double>
using dA = units::isq::si::electric_current<units::isq::si::deciampere, Rep>;
template<Representation Rep = double>
using daA = units::isq::si::electric_current<units::isq::si::decaampere, Rep>;
template<Representation Rep = double>
using hA = units::isq::si::electric_current<units::isq::si::hectoampere, Rep>;
template<Representation Rep = double>
using kA = units::isq::si::electric_current<units::isq::si::kiloampere, Rep>;
template<Representation Rep = double>
using MA = units::isq::si::electric_current<units::isq::si::megaampere, Rep>;
template<Representation Rep = double>
using GA = units::isq::si::electric_current<units::isq::si::gigaampere, Rep>;
template<Representation Rep = double>
using TA = units::isq::si::electric_current<units::isq::si::teraampere, Rep>;
template<Representation Rep = double>
using PA = units::isq::si::electric_current<units::isq::si::petaampere, Rep>;
template<Representation Rep = double>
using EA = units::isq::si::electric_current<units::isq::si::exaampere, Rep>;
template<Representation Rep = double>
using ZA = units::isq::si::electric_current<units::isq::si::zettaampere, Rep>;
template<Representation Rep = double>
using YA = units::isq::si::electric_current<units::isq::si::yottaampere, Rep>;
} // namespace units::aliases::isq::si::inline electric_current
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -34,7 +34,8 @@
namespace units::isq::si {
struct volt_per_metre : unit<volt_per_metre> {};
struct dim_electric_field_strength : isq::dim_electric_field_strength<dim_electric_field_strength, volt_per_metre, dim_voltage, dim_length> {};
struct dim_electric_field_strength :
isq::dim_electric_field_strength<dim_electric_field_strength, volt_per_metre, dim_voltage, dim_length> {};
template<UnitOf<dim_electric_field_strength> U, Representation Rep = double>
using electric_field_strength = quantity<dim_electric_field_strength, U, Rep>;
@@ -44,12 +45,16 @@ using electric_field_strength = quantity<dim_electric_field_strength, U, Rep>;
inline namespace literals {
// V/m
constexpr auto operator"" _q_V_per_m(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return electric_field_strength<volt_per_metre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_V_per_m(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return electric_field_strength<volt_per_metre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_V_per_m(long double l) { return electric_field_strength<volt_per_metre, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -57,8 +62,9 @@ constexpr auto operator"" _q_V_per_m(long double l) { return electric_field_stre
namespace units::aliases::isq::si::inline electric_field_strength {
template<Representation Rep = double> using V_per_m = units::isq::si::electric_field_strength<units::isq::si::volt_per_metre, Rep>;
template<Representation Rep = double>
using V_per_m = units::isq::si::electric_field_strength<units::isq::si::volt_per_metre, Rep>;
} // namespace units::aliases::isq::si::inline electric_field_strength
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -45,12 +45,16 @@ using energy_density = quantity<dim_energy_density, U, Rep>;
inline namespace literals {
// N/m
constexpr auto operator"" _q_J_per_m3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return energy_density<joule_per_metre_cub, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_J_per_m3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return energy_density<joule_per_metre_cub, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_J_per_m3(long double l) { return energy_density<joule_per_metre_cub, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -58,8 +62,9 @@ constexpr auto operator"" _q_J_per_m3(long double l) { return energy_density<jou
namespace units::aliases::isq::si::inline energy_density {
template<Representation Rep = double> using J_per_m3 = units::isq::si::energy_density<units::isq::si::joule_per_metre_cub, Rep>;
template<Representation Rep = double>
using J_per_m3 = units::isq::si::energy_density<units::isq::si::joule_per_metre_cub, Rep>;
} // namespace units::aliases::isq::si::inline energy_density
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
+122 -37
View File
@@ -62,76 +62,144 @@ using frequency = quantity<dim_frequency, U, Rep>;
inline namespace literals {
// Hz
constexpr auto operator"" _q_Hz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<hertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Hz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<hertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Hz(long double l) { return frequency<hertz, long double>(l); }
// yHz
constexpr auto operator"" _q_yHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<yoctohertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<yoctohertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yHz(long double l) { return frequency<yoctohertz, long double>(l); }
// zHz
constexpr auto operator"" _q_zHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<zeptohertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<zeptohertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zHz(long double l) { return frequency<zeptohertz, long double>(l); }
// aHz
constexpr auto operator"" _q_aHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<attohertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_aHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<attohertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_aHz(long double l) { return frequency<attohertz, long double>(l); }
// fHz
constexpr auto operator"" _q_fHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<femtohertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<femtohertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fHz(long double l) { return frequency<femtohertz, long double>(l); }
// pHz
constexpr auto operator"" _q_pHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<picohertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<picohertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pHz(long double l) { return frequency<picohertz, long double>(l); }
// nHz
constexpr auto operator"" _q_nHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<nanohertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<nanohertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nHz(long double l) { return frequency<nanohertz, long double>(l); }
// uHz
constexpr auto operator"" _q_uHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<microhertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_uHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<microhertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_uHz(long double l) { return frequency<microhertz, long double>(l); }
// mHz
constexpr auto operator"" _q_mHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<millihertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<millihertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mHz(long double l) { return frequency<millihertz, long double>(l); }
// kHz
constexpr auto operator"" _q_kHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<kilohertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<kilohertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kHz(long double l) { return frequency<kilohertz, long double>(l); }
// MHz
constexpr auto operator"" _q_MHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<megahertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<megahertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MHz(long double l) { return frequency<megahertz, long double>(l); }
// GHz
constexpr auto operator"" _q_GHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<gigahertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<gigahertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GHz(long double l) { return frequency<gigahertz, long double>(l); }
// THz
constexpr auto operator"" _q_THz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<terahertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_THz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<terahertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_THz(long double l) { return frequency<terahertz, long double>(l); }
// PHz
constexpr auto operator"" _q_PHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<petahertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<petahertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PHz(long double l) { return frequency<petahertz, long double>(l); }
// EHz
constexpr auto operator"" _q_EHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<exahertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<exahertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EHz(long double l) { return frequency<exahertz, long double>(l); }
// ZHz
constexpr auto operator"" _q_ZHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<zettahertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<zettahertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZHz(long double l) { return frequency<zettahertz, long double>(l); }
// YHz
constexpr auto operator"" _q_YHz(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return frequency<yottahertz, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YHz(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return frequency<yottahertz, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YHz(long double l) { return frequency<yottahertz, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -163,7 +231,7 @@ using namespace frequency_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -171,24 +239,41 @@ using namespace frequency_references;
namespace units::aliases::isq::si::inline frequency {
template<Representation Rep = double> using Hz = units::isq::si::frequency<units::isq::si::hertz, Rep>;
template<Representation Rep = double> using yHz = units::isq::si::frequency<units::isq::si::yoctohertz, Rep>;
template<Representation Rep = double> using zHz = units::isq::si::frequency<units::isq::si::zeptohertz, Rep>;
template<Representation Rep = double> using aHz = units::isq::si::frequency<units::isq::si::attohertz, Rep>;
template<Representation Rep = double> using fHz = units::isq::si::frequency<units::isq::si::femtohertz, Rep>;
template<Representation Rep = double> using pHz = units::isq::si::frequency<units::isq::si::picohertz, Rep>;
template<Representation Rep = double> using nHz = units::isq::si::frequency<units::isq::si::nanohertz, Rep>;
template<Representation Rep = double> using uHz = units::isq::si::frequency<units::isq::si::microhertz, Rep>;
template<Representation Rep = double> using mHz = units::isq::si::frequency<units::isq::si::millihertz, Rep>;
template<Representation Rep = double> using kHz = units::isq::si::frequency<units::isq::si::kilohertz, Rep>;
template<Representation Rep = double> using MHz = units::isq::si::frequency<units::isq::si::megahertz, Rep>;
template<Representation Rep = double> using GHz = units::isq::si::frequency<units::isq::si::gigahertz, Rep>;
template<Representation Rep = double> using THz = units::isq::si::frequency<units::isq::si::terahertz, Rep>;
template<Representation Rep = double> using PHz = units::isq::si::frequency<units::isq::si::petahertz, Rep>;
template<Representation Rep = double> using EHz = units::isq::si::frequency<units::isq::si::exahertz, Rep>;
template<Representation Rep = double> using ZHz = units::isq::si::frequency<units::isq::si::zettahertz, Rep>;
template<Representation Rep = double> using YHz = units::isq::si::frequency<units::isq::si::yottahertz, Rep>;
template<Representation Rep = double>
using Hz = units::isq::si::frequency<units::isq::si::hertz, Rep>;
template<Representation Rep = double>
using yHz = units::isq::si::frequency<units::isq::si::yoctohertz, Rep>;
template<Representation Rep = double>
using zHz = units::isq::si::frequency<units::isq::si::zeptohertz, Rep>;
template<Representation Rep = double>
using aHz = units::isq::si::frequency<units::isq::si::attohertz, Rep>;
template<Representation Rep = double>
using fHz = units::isq::si::frequency<units::isq::si::femtohertz, Rep>;
template<Representation Rep = double>
using pHz = units::isq::si::frequency<units::isq::si::picohertz, Rep>;
template<Representation Rep = double>
using nHz = units::isq::si::frequency<units::isq::si::nanohertz, Rep>;
template<Representation Rep = double>
using uHz = units::isq::si::frequency<units::isq::si::microhertz, Rep>;
template<Representation Rep = double>
using mHz = units::isq::si::frequency<units::isq::si::millihertz, Rep>;
template<Representation Rep = double>
using kHz = units::isq::si::frequency<units::isq::si::kilohertz, Rep>;
template<Representation Rep = double>
using MHz = units::isq::si::frequency<units::isq::si::megahertz, Rep>;
template<Representation Rep = double>
using GHz = units::isq::si::frequency<units::isq::si::gigahertz, Rep>;
template<Representation Rep = double>
using THz = units::isq::si::frequency<units::isq::si::terahertz, Rep>;
template<Representation Rep = double>
using PHz = units::isq::si::frequency<units::isq::si::petahertz, Rep>;
template<Representation Rep = double>
using EHz = units::isq::si::frequency<units::isq::si::exahertz, Rep>;
template<Representation Rep = double>
using ZHz = units::isq::si::frequency<units::isq::si::zettahertz, Rep>;
template<Representation Rep = double>
using YHz = units::isq::si::frequency<units::isq::si::yottahertz, Rep>;
} // namespace units::aliases::isq::si::inline frequency
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -28,10 +28,10 @@
#include <units/symbol_text.h>
// IWYU pragma: end_exports
#include <units/isq/si/thermodynamic_temperature.h>
#include <units/isq/si/amount_of_substance.h>
#include <units/isq/si/energy.h>
#include <units/isq/si/mass.h>
#include <units/isq/si/amount_of_substance.h>
#include <units/isq/si/thermodynamic_temperature.h>
#include <units/unit.h>
namespace units::isq::si {
@@ -40,9 +40,14 @@ struct joule_per_kelvin : unit<joule_per_kelvin> {};
struct joule_per_kilogram_kelvin : unit<joule_per_kilogram_kelvin> {};
struct joule_per_mole_kelvin : unit<joule_per_mole_kelvin> {};
struct dim_heat_capacity : isq::dim_heat_capacity<dim_heat_capacity, joule_per_kelvin, dim_energy, dim_thermodynamic_temperature> {};
struct dim_specific_heat_capacity : isq::dim_specific_heat_capacity<dim_specific_heat_capacity, joule_per_kilogram_kelvin, dim_heat_capacity, dim_mass> {};
struct dim_molar_heat_capacity : isq::dim_molar_heat_capacity<dim_molar_heat_capacity, joule_per_mole_kelvin, dim_heat_capacity, dim_amount_of_substance> {};
struct dim_heat_capacity :
isq::dim_heat_capacity<dim_heat_capacity, joule_per_kelvin, dim_energy, dim_thermodynamic_temperature> {};
struct dim_specific_heat_capacity :
isq::dim_specific_heat_capacity<dim_specific_heat_capacity, joule_per_kilogram_kelvin, dim_heat_capacity,
dim_mass> {};
struct dim_molar_heat_capacity :
isq::dim_molar_heat_capacity<dim_molar_heat_capacity, joule_per_mole_kelvin, dim_heat_capacity,
dim_amount_of_substance> {};
template<UnitOf<dim_heat_capacity> U, Representation Rep = double>
using heat_capacity = quantity<dim_heat_capacity, U, Rep>;
@@ -58,20 +63,38 @@ using molar_heat_capacity = quantity<dim_molar_heat_capacity, U, Rep>;
inline namespace literals {
// J/K
constexpr auto operator"" _q_J_per_K(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return heat_capacity<joule_per_kelvin, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_J_per_K(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return heat_capacity<joule_per_kelvin, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_J_per_K(long double l) { return heat_capacity<joule_per_kelvin, long double>(l); }
// J/(kg·K)
constexpr auto operator"" _q_J_per_kg_K(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return specific_heat_capacity<joule_per_kilogram_kelvin, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_J_per_kg_K(long double l) { return specific_heat_capacity<joule_per_kilogram_kelvin, long double>(l); }
constexpr auto operator"" _q_J_per_kg_K(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return specific_heat_capacity<joule_per_kilogram_kelvin, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_J_per_kg_K(long double l)
{
return specific_heat_capacity<joule_per_kilogram_kelvin, long double>(l);
}
// J/(mol·K)
constexpr auto operator"" _q_J_per_mol_K(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return molar_heat_capacity<joule_per_mole_kelvin, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_J_per_mol_K(long double l) { return molar_heat_capacity<joule_per_mole_kelvin, long double>(l); }
constexpr auto operator"" _q_J_per_mol_K(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return molar_heat_capacity<joule_per_mole_kelvin, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_J_per_mol_K(long double l)
{
return molar_heat_capacity<joule_per_mole_kelvin, long double>(l);
}
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -79,10 +102,13 @@ constexpr auto operator"" _q_J_per_mol_K(long double l) { return molar_heat_capa
namespace units::aliases::isq::si::heat_capacity {
template<Representation Rep = double> using J_per_K = units::isq::si::heat_capacity<units::isq::si::joule_per_kelvin, Rep>;
template<Representation Rep = double> using J_per_kg_K = units::isq::si::specific_heat_capacity<units::isq::si::joule_per_kilogram_kelvin, Rep>;
template<Representation Rep = double> using J_per_mol_K = units::isq::si::molar_heat_capacity<units::isq::si::joule_per_mole_kelvin, Rep>;
template<Representation Rep = double>
using J_per_K = units::isq::si::heat_capacity<units::isq::si::joule_per_kelvin, Rep>;
template<Representation Rep = double>
using J_per_kg_K = units::isq::si::specific_heat_capacity<units::isq::si::joule_per_kilogram_kelvin, Rep>;
template<Representation Rep = double>
using J_per_mol_K = units::isq::si::molar_heat_capacity<units::isq::si::joule_per_mole_kelvin, Rep>;
} // namespace units::aliases::isq::si::heat_capacity
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
+123 -38
View File
@@ -29,8 +29,8 @@
#include <units/symbol_text.h>
// IWYU pragma: end_exports
#include <units/isq/si/magnetic_flux.h>
#include <units/isq/si/electric_current.h>
#include <units/isq/si/magnetic_flux.h>
#include <units/unit.h>
namespace units::isq::si {
@@ -64,76 +64,144 @@ using inductance = quantity<dim_inductance, U, Rep>;
inline namespace literals {
// H
constexpr auto operator"" _q_H(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<henry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_H(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<henry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_H(long double l) { return inductance<henry, long double>(l); }
// yH
constexpr auto operator"" _q_yH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<yoctohenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<yoctohenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yH(long double l) { return inductance<yoctohenry, long double>(l); }
// zH
constexpr auto operator"" _q_zH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<zeptohenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<zeptohenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zH(long double l) { return inductance<zeptohenry, long double>(l); }
// aH
constexpr auto operator"" _q_aH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<attohenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_aH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<attohenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_aH(long double l) { return inductance<attohenry, long double>(l); }
// fH
constexpr auto operator"" _q_fH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<femtohenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<femtohenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fH(long double l) { return inductance<femtohenry, long double>(l); }
// pH
constexpr auto operator"" _q_pH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<picohenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<picohenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pH(long double l) { return inductance<picohenry, long double>(l); }
// nH
constexpr auto operator"" _q_nH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<nanohenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<nanohenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nH(long double l) { return inductance<nanohenry, long double>(l); }
// µH
constexpr auto operator"" _q_uH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<microhenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_uH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<microhenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_uH(long double l) { return inductance<microhenry, long double>(l); }
// mH
constexpr auto operator"" _q_mH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<millihenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<millihenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mH(long double l) { return inductance<millihenry, long double>(l); }
// kH
constexpr auto operator"" _q_kH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<kilohenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<kilohenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kH(long double l) { return inductance<kilohenry, long double>(l); }
// MH
constexpr auto operator"" _q_MH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<megahenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<megahenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MH(long double l) { return inductance<megahenry, long double>(l); }
// GH
constexpr auto operator"" _q_GH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<gigahenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<gigahenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GH(long double l) { return inductance<gigahenry, long double>(l); }
// TH
constexpr auto operator"" _q_TH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<terahenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<terahenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TH(long double l) { return inductance<terahenry, long double>(l); }
// PH
constexpr auto operator"" _q_PH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<petahenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<petahenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PH(long double l) { return inductance<petahenry, long double>(l); }
// EH
constexpr auto operator"" _q_EH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<exahenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<exahenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EH(long double l) { return inductance<exahenry, long double>(l); }
// ZH
constexpr auto operator"" _q_ZH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<zettahenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<zettahenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZH(long double l) { return inductance<zettahenry, long double>(l); }
// YH
constexpr auto operator"" _q_YH(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return inductance<yottahenry, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YH(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return inductance<yottahenry, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YH(long double l) { return inductance<yottahenry, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -165,7 +233,7 @@ using namespace inductance_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -173,24 +241,41 @@ using namespace inductance_references;
namespace units::aliases::isq::si::inline inductance {
template<Representation Rep = double> using H = units::isq::si::inductance<units::isq::si::henry, Rep>;
template<Representation Rep = double> using yH = units::isq::si::inductance<units::isq::si::yoctohenry, Rep>;
template<Representation Rep = double> using zH = units::isq::si::inductance<units::isq::si::zeptohenry, Rep>;
template<Representation Rep = double> using aH = units::isq::si::inductance<units::isq::si::attohenry, Rep>;
template<Representation Rep = double> using fH = units::isq::si::inductance<units::isq::si::femtohenry, Rep>;
template<Representation Rep = double> using pH = units::isq::si::inductance<units::isq::si::picohenry, Rep>;
template<Representation Rep = double> using nH = units::isq::si::inductance<units::isq::si::nanohenry, Rep>;
template<Representation Rep = double> using uH = units::isq::si::inductance<units::isq::si::microhenry, Rep>;
template<Representation Rep = double> using mH = units::isq::si::inductance<units::isq::si::millihenry, Rep>;
template<Representation Rep = double> using kH = units::isq::si::inductance<units::isq::si::kilohenry, Rep>;
template<Representation Rep = double> using MH = units::isq::si::inductance<units::isq::si::megahenry, Rep>;
template<Representation Rep = double> using GH = units::isq::si::inductance<units::isq::si::gigahenry, Rep>;
template<Representation Rep = double> using TH = units::isq::si::inductance<units::isq::si::terahenry, Rep>;
template<Representation Rep = double> using PH = units::isq::si::inductance<units::isq::si::petahenry, Rep>;
template<Representation Rep = double> using EH = units::isq::si::inductance<units::isq::si::exahenry, Rep>;
template<Representation Rep = double> using ZH = units::isq::si::inductance<units::isq::si::zettahenry, Rep>;
template<Representation Rep = double> using YH = units::isq::si::inductance<units::isq::si::yottahenry, Rep>;
template<Representation Rep = double>
using H = units::isq::si::inductance<units::isq::si::henry, Rep>;
template<Representation Rep = double>
using yH = units::isq::si::inductance<units::isq::si::yoctohenry, Rep>;
template<Representation Rep = double>
using zH = units::isq::si::inductance<units::isq::si::zeptohenry, Rep>;
template<Representation Rep = double>
using aH = units::isq::si::inductance<units::isq::si::attohenry, Rep>;
template<Representation Rep = double>
using fH = units::isq::si::inductance<units::isq::si::femtohenry, Rep>;
template<Representation Rep = double>
using pH = units::isq::si::inductance<units::isq::si::picohenry, Rep>;
template<Representation Rep = double>
using nH = units::isq::si::inductance<units::isq::si::nanohenry, Rep>;
template<Representation Rep = double>
using uH = units::isq::si::inductance<units::isq::si::microhenry, Rep>;
template<Representation Rep = double>
using mH = units::isq::si::inductance<units::isq::si::millihenry, Rep>;
template<Representation Rep = double>
using kH = units::isq::si::inductance<units::isq::si::kilohenry, Rep>;
template<Representation Rep = double>
using MH = units::isq::si::inductance<units::isq::si::megahenry, Rep>;
template<Representation Rep = double>
using GH = units::isq::si::inductance<units::isq::si::gigahenry, Rep>;
template<Representation Rep = double>
using TH = units::isq::si::inductance<units::isq::si::terahenry, Rep>;
template<Representation Rep = double>
using PH = units::isq::si::inductance<units::isq::si::petahenry, Rep>;
template<Representation Rep = double>
using EH = units::isq::si::inductance<units::isq::si::exahenry, Rep>;
template<Representation Rep = double>
using ZH = units::isq::si::inductance<units::isq::si::zettahenry, Rep>;
template<Representation Rep = double>
using YH = units::isq::si::inductance<units::isq::si::yottahenry, Rep>;
} // namespace units::aliases::isq::si::inline inductance
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
+158 -48
View File
@@ -68,96 +68,184 @@ using length = quantity<dim_length, U, Rep>;
inline namespace literals {
// m
constexpr auto operator"" _q_m(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<metre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_m(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<metre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_m(long double l) { return length<metre, long double>(l); }
// ym
constexpr auto operator"" _q_ym(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<yoctometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ym(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<yoctometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ym(long double l) { return length<yoctometre, long double>(l); }
// zm
constexpr auto operator"" _q_zm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<zeptometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<zeptometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zm(long double l) { return length<zeptometre, long double>(l); }
// am
constexpr auto operator"" _q_am(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<attometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_am(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<attometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_am(long double l) { return length<attometre, long double>(l); }
// fm
constexpr auto operator"" _q_fm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<femtometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<femtometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fm(long double l) { return length<femtometre, long double>(l); }
// pm
constexpr auto operator"" _q_pm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<picometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<picometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pm(long double l) { return length<picometre, long double>(l); }
// nm
constexpr auto operator"" _q_nm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<nanometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<nanometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nm(long double l) { return length<nanometre, long double>(l); }
// um
constexpr auto operator"" _q_um(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<micrometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_um(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<micrometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_um(long double l) { return length<micrometre, long double>(l); }
// mm
constexpr auto operator"" _q_mm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<millimetre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<millimetre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mm(long double l) { return length<millimetre, long double>(l); }
// cm
constexpr auto operator"" _q_cm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<centimetre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_cm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<centimetre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_cm(long double l) { return length<centimetre, long double>(l); }
// dm
constexpr auto operator"" _q_dm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<decimetre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<decimetre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dm(long double l) { return length<decimetre, long double>(l); }
// dam
constexpr auto operator"" _q_dam(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<decametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dam(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<decametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dam(long double l) { return length<decametre, long double>(l); }
// hm
constexpr auto operator"" _q_hm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<hectometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_hm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<hectometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_hm(long double l) { return length<hectometre, long double>(l); }
// km
constexpr auto operator"" _q_km(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<kilometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_km(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<kilometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_km(long double l) { return length<kilometre, long double>(l); }
// Mm
constexpr auto operator"" _q_Mm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<megametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Mm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<megametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Mm(long double l) { return length<megametre, long double>(l); }
// Gm
constexpr auto operator"" _q_Gm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<gigametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Gm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<gigametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Gm(long double l) { return length<gigametre, long double>(l); }
// Tm
constexpr auto operator"" _q_Tm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<terametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Tm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<terametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Tm(long double l) { return length<terametre, long double>(l); }
// Pm
constexpr auto operator"" _q_Pm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<petametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Pm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<petametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Pm(long double l) { return length<petametre, long double>(l); }
// Em
constexpr auto operator"" _q_Em(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<exametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Em(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<exametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Em(long double l) { return length<exametre, long double>(l); }
// Zm
constexpr auto operator"" _q_Zm(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<zettametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Zm(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<zettametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Zm(long double l) { return length<zettametre, long double>(l); }
// Ym
constexpr auto operator"" _q_Ym(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<yottametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Ym(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<yottametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Ym(long double l) { return length<yottametre, long double>(l); }
// au
constexpr auto operator"" _q_au(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return length<astronomical_unit, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_au(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return length<astronomical_unit, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_au(long double l) { return length<astronomical_unit, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -188,13 +276,13 @@ inline constexpr auto au = reference<dim_length, astronomical_unit>{};
} // namespace length_references
namespace references {
namespace references {
using namespace length_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -202,29 +290,51 @@ using namespace length_references;
namespace units::aliases::isq::si::inline length {
template<Representation Rep = double> using m = units::isq::si::length<units::isq::si::metre, Rep>;
template<Representation Rep = double> using ym = units::isq::si::length<units::isq::si::yoctometre, Rep>;
template<Representation Rep = double> using zm = units::isq::si::length<units::isq::si::zeptometre, Rep>;
template<Representation Rep = double> using am = units::isq::si::length<units::isq::si::attometre, Rep>;
template<Representation Rep = double> using fm = units::isq::si::length<units::isq::si::femtometre, Rep>;
template<Representation Rep = double> using pm = units::isq::si::length<units::isq::si::picometre, Rep>;
template<Representation Rep = double> using nm = units::isq::si::length<units::isq::si::nanometre, Rep>;
template<Representation Rep = double> using um = units::isq::si::length<units::isq::si::micrometre, Rep>;
template<Representation Rep = double> using mm = units::isq::si::length<units::isq::si::millimetre, Rep>;
template<Representation Rep = double> using cm = units::isq::si::length<units::isq::si::centimetre, Rep>;
template<Representation Rep = double> using dm = units::isq::si::length<units::isq::si::decimetre, Rep>;
template<Representation Rep = double> using dam = units::isq::si::length<units::isq::si::decametre, Rep>;
template<Representation Rep = double> using hm = units::isq::si::length<units::isq::si::hectometre, Rep>;
template<Representation Rep = double> using km = units::isq::si::length<units::isq::si::kilometre, Rep>;
template<Representation Rep = double> using Mm = units::isq::si::length<units::isq::si::megametre, Rep>;
template<Representation Rep = double> using Gm = units::isq::si::length<units::isq::si::gigametre, Rep>;
template<Representation Rep = double> using Tm = units::isq::si::length<units::isq::si::terametre, Rep>;
template<Representation Rep = double> using Pm = units::isq::si::length<units::isq::si::petametre, Rep>;
template<Representation Rep = double> using Em = units::isq::si::length<units::isq::si::exametre, Rep>;
template<Representation Rep = double> using Zm = units::isq::si::length<units::isq::si::zettametre, Rep>;
template<Representation Rep = double> using Ym = units::isq::si::length<units::isq::si::yottametre, Rep>;
template<Representation Rep = double> using au = units::isq::si::length<units::isq::si::astronomical_unit, Rep>;
template<Representation Rep = double>
using m = units::isq::si::length<units::isq::si::metre, Rep>;
template<Representation Rep = double>
using ym = units::isq::si::length<units::isq::si::yoctometre, Rep>;
template<Representation Rep = double>
using zm = units::isq::si::length<units::isq::si::zeptometre, Rep>;
template<Representation Rep = double>
using am = units::isq::si::length<units::isq::si::attometre, Rep>;
template<Representation Rep = double>
using fm = units::isq::si::length<units::isq::si::femtometre, Rep>;
template<Representation Rep = double>
using pm = units::isq::si::length<units::isq::si::picometre, Rep>;
template<Representation Rep = double>
using nm = units::isq::si::length<units::isq::si::nanometre, Rep>;
template<Representation Rep = double>
using um = units::isq::si::length<units::isq::si::micrometre, Rep>;
template<Representation Rep = double>
using mm = units::isq::si::length<units::isq::si::millimetre, Rep>;
template<Representation Rep = double>
using cm = units::isq::si::length<units::isq::si::centimetre, Rep>;
template<Representation Rep = double>
using dm = units::isq::si::length<units::isq::si::decimetre, Rep>;
template<Representation Rep = double>
using dam = units::isq::si::length<units::isq::si::decametre, Rep>;
template<Representation Rep = double>
using hm = units::isq::si::length<units::isq::si::hectometre, Rep>;
template<Representation Rep = double>
using km = units::isq::si::length<units::isq::si::kilometre, Rep>;
template<Representation Rep = double>
using Mm = units::isq::si::length<units::isq::si::megametre, Rep>;
template<Representation Rep = double>
using Gm = units::isq::si::length<units::isq::si::gigametre, Rep>;
template<Representation Rep = double>
using Tm = units::isq::si::length<units::isq::si::terametre, Rep>;
template<Representation Rep = double>
using Pm = units::isq::si::length<units::isq::si::petametre, Rep>;
template<Representation Rep = double>
using Em = units::isq::si::length<units::isq::si::exametre, Rep>;
template<Representation Rep = double>
using Zm = units::isq::si::length<units::isq::si::zettametre, Rep>;
template<Representation Rep = double>
using Ym = units::isq::si::length<units::isq::si::yottametre, Rep>;
template<Representation Rep = double>
using au = units::isq::si::length<units::isq::si::astronomical_unit, Rep>;
} // namespace units::aliases::isq::si::inline length
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -29,8 +29,8 @@
#include <units/symbol_text.h>
// IWYU pragma: end_exports
#include <units/isq/si/magnetic_induction.h>
#include <units/isq/si/area.h>
#include <units/isq/si/magnetic_induction.h>
#include <units/unit.h>
namespace units::isq::si {
@@ -64,76 +64,144 @@ using magnetic_flux = quantity<dim_magnetic_flux, U, Rep>;
inline namespace literals {
// Wb
constexpr auto operator"" _q_Wb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<weber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Wb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<weber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Wb(long double l) { return magnetic_flux<weber, long double>(l); }
// yWb
constexpr auto operator"" _q_yWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<yoctoweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<yoctoweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yWb(long double l) { return magnetic_flux<yoctoweber, long double>(l); }
// zWb
constexpr auto operator"" _q_zWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<zeptoweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<zeptoweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zWb(long double l) { return magnetic_flux<zeptoweber, long double>(l); }
// aWb
constexpr auto operator"" _q_aWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<attoweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_aWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<attoweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_aWb(long double l) { return magnetic_flux<attoweber, long double>(l); }
// fWb
constexpr auto operator"" _q_fWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<femtoweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<femtoweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fWb(long double l) { return magnetic_flux<femtoweber, long double>(l); }
// pWb
constexpr auto operator"" _q_pWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<picoweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<picoweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pWb(long double l) { return magnetic_flux<picoweber, long double>(l); }
// nWb
constexpr auto operator"" _q_nWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<nanoweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<nanoweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nWb(long double l) { return magnetic_flux<nanoweber, long double>(l); }
// µWb
constexpr auto operator"" _q_uWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<microweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_uWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<microweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_uWb(long double l) { return magnetic_flux<microweber, long double>(l); }
// mWb
constexpr auto operator"" _q_mWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<milliweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<milliweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mWb(long double l) { return magnetic_flux<milliweber, long double>(l); }
// kWb
constexpr auto operator"" _q_kWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<kiloweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<kiloweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kWb(long double l) { return magnetic_flux<kiloweber, long double>(l); }
// MWb
constexpr auto operator"" _q_MWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<megaweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<megaweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MWb(long double l) { return magnetic_flux<megaweber, long double>(l); }
// GWb
constexpr auto operator"" _q_GWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<gigaweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<gigaweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GWb(long double l) { return magnetic_flux<gigaweber, long double>(l); }
// TWb
constexpr auto operator"" _q_TWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<teraweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<teraweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TWb(long double l) { return magnetic_flux<teraweber, long double>(l); }
// PWb
constexpr auto operator"" _q_PWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<petaweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<petaweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PWb(long double l) { return magnetic_flux<petaweber, long double>(l); }
// EWb
constexpr auto operator"" _q_EWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<exaweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<exaweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EWb(long double l) { return magnetic_flux<exaweber, long double>(l); }
// ZWb
constexpr auto operator"" _q_ZWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<zettaweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<zettaweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZWb(long double l) { return magnetic_flux<zettaweber, long double>(l); }
// YWb
constexpr auto operator"" _q_YWb(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_flux<yottaweber, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YWb(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_flux<yottaweber, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YWb(long double l) { return magnetic_flux<yottaweber, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -165,7 +233,7 @@ using namespace magnetic_flux_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -173,24 +241,41 @@ using namespace magnetic_flux_references;
namespace units::aliases::isq::si::inline magnetic_flux {
template<Representation Rep = double> using Wb = units::isq::si::magnetic_flux<units::isq::si::weber, Rep>;
template<Representation Rep = double> using yWb = units::isq::si::magnetic_flux<units::isq::si::yoctoweber, Rep>;
template<Representation Rep = double> using zWb = units::isq::si::magnetic_flux<units::isq::si::zeptoweber, Rep>;
template<Representation Rep = double> using aWb = units::isq::si::magnetic_flux<units::isq::si::attoweber, Rep>;
template<Representation Rep = double> using fWb = units::isq::si::magnetic_flux<units::isq::si::femtoweber, Rep>;
template<Representation Rep = double> using pWb = units::isq::si::magnetic_flux<units::isq::si::picoweber, Rep>;
template<Representation Rep = double> using nWb = units::isq::si::magnetic_flux<units::isq::si::nanoweber, Rep>;
template<Representation Rep = double> using uWb = units::isq::si::magnetic_flux<units::isq::si::microweber, Rep>;
template<Representation Rep = double> using mWb = units::isq::si::magnetic_flux<units::isq::si::milliweber, Rep>;
template<Representation Rep = double> using kWb = units::isq::si::magnetic_flux<units::isq::si::kiloweber, Rep>;
template<Representation Rep = double> using MWb = units::isq::si::magnetic_flux<units::isq::si::megaweber, Rep>;
template<Representation Rep = double> using GWb = units::isq::si::magnetic_flux<units::isq::si::gigaweber, Rep>;
template<Representation Rep = double> using TWb = units::isq::si::magnetic_flux<units::isq::si::teraweber, Rep>;
template<Representation Rep = double> using PWb = units::isq::si::magnetic_flux<units::isq::si::petaweber, Rep>;
template<Representation Rep = double> using EWb = units::isq::si::magnetic_flux<units::isq::si::exaweber, Rep>;
template<Representation Rep = double> using ZWb = units::isq::si::magnetic_flux<units::isq::si::zettaweber, Rep>;
template<Representation Rep = double> using YWb = units::isq::si::magnetic_flux<units::isq::si::yottaweber, Rep>;
template<Representation Rep = double>
using Wb = units::isq::si::magnetic_flux<units::isq::si::weber, Rep>;
template<Representation Rep = double>
using yWb = units::isq::si::magnetic_flux<units::isq::si::yoctoweber, Rep>;
template<Representation Rep = double>
using zWb = units::isq::si::magnetic_flux<units::isq::si::zeptoweber, Rep>;
template<Representation Rep = double>
using aWb = units::isq::si::magnetic_flux<units::isq::si::attoweber, Rep>;
template<Representation Rep = double>
using fWb = units::isq::si::magnetic_flux<units::isq::si::femtoweber, Rep>;
template<Representation Rep = double>
using pWb = units::isq::si::magnetic_flux<units::isq::si::picoweber, Rep>;
template<Representation Rep = double>
using nWb = units::isq::si::magnetic_flux<units::isq::si::nanoweber, Rep>;
template<Representation Rep = double>
using uWb = units::isq::si::magnetic_flux<units::isq::si::microweber, Rep>;
template<Representation Rep = double>
using mWb = units::isq::si::magnetic_flux<units::isq::si::milliweber, Rep>;
template<Representation Rep = double>
using kWb = units::isq::si::magnetic_flux<units::isq::si::kiloweber, Rep>;
template<Representation Rep = double>
using MWb = units::isq::si::magnetic_flux<units::isq::si::megaweber, Rep>;
template<Representation Rep = double>
using GWb = units::isq::si::magnetic_flux<units::isq::si::gigaweber, Rep>;
template<Representation Rep = double>
using TWb = units::isq::si::magnetic_flux<units::isq::si::teraweber, Rep>;
template<Representation Rep = double>
using PWb = units::isq::si::magnetic_flux<units::isq::si::petaweber, Rep>;
template<Representation Rep = double>
using EWb = units::isq::si::magnetic_flux<units::isq::si::exaweber, Rep>;
template<Representation Rep = double>
using ZWb = units::isq::si::magnetic_flux<units::isq::si::zettaweber, Rep>;
template<Representation Rep = double>
using YWb = units::isq::si::magnetic_flux<units::isq::si::yottaweber, Rep>;
} // namespace units::aliases::isq::si::inline magnetic_flux
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -29,10 +29,10 @@
#include <units/symbol_text.h>
// IWYU pragma: end_exports
#include <units/isq/si/voltage.h>
#include <units/isq/si/time.h>
#include <units/isq/si/length.h>
#include <units/isq/si/prefixes.h>
#include <units/isq/si/time.h>
#include <units/isq/si/voltage.h>
#include <units/unit.h>
namespace units::isq::si {
@@ -58,7 +58,8 @@ struct yottatesla : prefixed_unit<yottatesla, yotta, tesla> {};
struct gauss : named_scaled_unit<gauss, "G", prefix, ratio(1, 10'000), tesla> {};
struct dim_magnetic_induction : isq::dim_magnetic_induction<dim_magnetic_induction, tesla, dim_voltage, dim_time, dim_length> {};
struct dim_magnetic_induction :
isq::dim_magnetic_induction<dim_magnetic_induction, tesla, dim_voltage, dim_time, dim_length> {};
template<UnitOf<dim_magnetic_induction> U, Representation Rep = double>
using magnetic_induction = quantity<dim_magnetic_induction, U, Rep>;
@@ -68,80 +69,152 @@ using magnetic_induction = quantity<dim_magnetic_induction, U, Rep>;
inline namespace literals {
// T
constexpr auto operator"" _q_T(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<tesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_T(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<tesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_T(long double l) { return magnetic_induction<tesla, long double>(l); }
// yT
constexpr auto operator"" _q_yT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<yoctotesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<yoctotesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yT(long double l) { return magnetic_induction<yoctotesla, long double>(l); }
// zT
constexpr auto operator"" _q_zT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<zeptotesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<zeptotesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zT(long double l) { return magnetic_induction<zeptotesla, long double>(l); }
// aT
constexpr auto operator"" _q_aT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<attotesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_aT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<attotesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_aT(long double l) { return magnetic_induction<attotesla, long double>(l); }
// fT
constexpr auto operator"" _q_fT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<femtotesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<femtotesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fT(long double l) { return magnetic_induction<femtotesla, long double>(l); }
// pT
constexpr auto operator"" _q_pT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<picotesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<picotesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pT(long double l) { return magnetic_induction<picotesla, long double>(l); }
// nT
constexpr auto operator"" _q_nT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<nanotesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<nanotesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nT(long double l) { return magnetic_induction<nanotesla, long double>(l); }
// µT
constexpr auto operator"" _q_uT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<microtesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_uT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<microtesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_uT(long double l) { return magnetic_induction<microtesla, long double>(l); }
// mT
constexpr auto operator"" _q_mT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<millitesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<millitesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mT(long double l) { return magnetic_induction<millitesla, long double>(l); }
// kT
constexpr auto operator"" _q_kT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<kilotesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<kilotesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kT(long double l) { return magnetic_induction<kilotesla, long double>(l); }
// MT
constexpr auto operator"" _q_MT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<megatesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<megatesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MT(long double l) { return magnetic_induction<megatesla, long double>(l); }
// GT
constexpr auto operator"" _q_GT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<gigatesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<gigatesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GT(long double l) { return magnetic_induction<gigatesla, long double>(l); }
// TT
constexpr auto operator"" _q_TT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<teratesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<teratesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TT(long double l) { return magnetic_induction<teratesla, long double>(l); }
// PT
constexpr auto operator"" _q_PT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<petatesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<petatesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PT(long double l) { return magnetic_induction<petatesla, long double>(l); }
// ET
constexpr auto operator"" _q_ET(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<exatesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ET(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<exatesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ET(long double l) { return magnetic_induction<exatesla, long double>(l); }
// ZT
constexpr auto operator"" _q_ZT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<zettatesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<zettatesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZT(long double l) { return magnetic_induction<zettatesla, long double>(l); }
// YT
constexpr auto operator"" _q_YT(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<yottatesla, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YT(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<yottatesla, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YT(long double l) { return magnetic_induction<yottatesla, long double>(l); }
// G
constexpr auto operator"" _q_G(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return magnetic_induction<gauss, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_G(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return magnetic_induction<gauss, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_G(long double l) { return magnetic_induction<gauss, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -174,33 +247,51 @@ using namespace magnetic_induction_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
} // namespace units::isq::si
#ifndef UNITS_NO_ALIASES
namespace units::aliases::isq::si::inline magnetic_induction {
template<Representation Rep = double> using T = units::isq::si::magnetic_induction<units::isq::si::tesla, Rep>;
template<Representation Rep = double> using yT = units::isq::si::magnetic_induction<units::isq::si::yoctotesla, Rep>;
template<Representation Rep = double> using zT = units::isq::si::magnetic_induction<units::isq::si::zeptotesla, Rep>;
template<Representation Rep = double> using aT = units::isq::si::magnetic_induction<units::isq::si::attotesla, Rep>;
template<Representation Rep = double> using fT = units::isq::si::magnetic_induction<units::isq::si::femtotesla, Rep>;
template<Representation Rep = double> using pT = units::isq::si::magnetic_induction<units::isq::si::picotesla, Rep>;
template<Representation Rep = double> using nT = units::isq::si::magnetic_induction<units::isq::si::nanotesla, Rep>;
template<Representation Rep = double> using uT = units::isq::si::magnetic_induction<units::isq::si::microtesla, Rep>;
template<Representation Rep = double> using mT = units::isq::si::magnetic_induction<units::isq::si::millitesla, Rep>;
template<Representation Rep = double> using kT = units::isq::si::magnetic_induction<units::isq::si::kilotesla, Rep>;
template<Representation Rep = double> using MT = units::isq::si::magnetic_induction<units::isq::si::megatesla, Rep>;
template<Representation Rep = double> using GT = units::isq::si::magnetic_induction<units::isq::si::gigatesla, Rep>;
template<Representation Rep = double> using TT = units::isq::si::magnetic_induction<units::isq::si::teratesla, Rep>;
template<Representation Rep = double> using PT = units::isq::si::magnetic_induction<units::isq::si::petatesla, Rep>;
template<Representation Rep = double> using ET = units::isq::si::magnetic_induction<units::isq::si::exatesla, Rep>;
template<Representation Rep = double> using ZT = units::isq::si::magnetic_induction<units::isq::si::zettatesla, Rep>;
template<Representation Rep = double> using YT = units::isq::si::magnetic_induction<units::isq::si::yottatesla, Rep>;
template<Representation Rep = double> using G = units::isq::si::magnetic_induction<units::isq::si::gauss, Rep>;
template<Representation Rep = double>
using T = units::isq::si::magnetic_induction<units::isq::si::tesla, Rep>;
template<Representation Rep = double>
using yT = units::isq::si::magnetic_induction<units::isq::si::yoctotesla, Rep>;
template<Representation Rep = double>
using zT = units::isq::si::magnetic_induction<units::isq::si::zeptotesla, Rep>;
template<Representation Rep = double>
using aT = units::isq::si::magnetic_induction<units::isq::si::attotesla, Rep>;
template<Representation Rep = double>
using fT = units::isq::si::magnetic_induction<units::isq::si::femtotesla, Rep>;
template<Representation Rep = double>
using pT = units::isq::si::magnetic_induction<units::isq::si::picotesla, Rep>;
template<Representation Rep = double>
using nT = units::isq::si::magnetic_induction<units::isq::si::nanotesla, Rep>;
template<Representation Rep = double>
using uT = units::isq::si::magnetic_induction<units::isq::si::microtesla, Rep>;
template<Representation Rep = double>
using mT = units::isq::si::magnetic_induction<units::isq::si::millitesla, Rep>;
template<Representation Rep = double>
using kT = units::isq::si::magnetic_induction<units::isq::si::kilotesla, Rep>;
template<Representation Rep = double>
using MT = units::isq::si::magnetic_induction<units::isq::si::megatesla, Rep>;
template<Representation Rep = double>
using GT = units::isq::si::magnetic_induction<units::isq::si::gigatesla, Rep>;
template<Representation Rep = double>
using TT = units::isq::si::magnetic_induction<units::isq::si::teratesla, Rep>;
template<Representation Rep = double>
using PT = units::isq::si::magnetic_induction<units::isq::si::petatesla, Rep>;
template<Representation Rep = double>
using ET = units::isq::si::magnetic_induction<units::isq::si::exatesla, Rep>;
template<Representation Rep = double>
using ZT = units::isq::si::magnetic_induction<units::isq::si::zettatesla, Rep>;
template<Representation Rep = double>
using YT = units::isq::si::magnetic_induction<units::isq::si::yottatesla, Rep>;
template<Representation Rep = double>
using G = units::isq::si::magnetic_induction<units::isq::si::gauss, Rep>;
} // namespace units::aliases::isq::si::inline magnetic_induction
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
+304 -91
View File
@@ -78,7 +78,8 @@ struct exatonne : prefixed_alias_unit<yottagram, exa, tonne> {};
struct zettatonne : prefixed_unit<zettatonne, zetta, tonne> {};
struct yottatonne : prefixed_unit<yottatonne, yotta, tonne> {};
struct dalton : named_scaled_unit<dalton, "Da", no_prefix, ratio(16'605'390'666'050, 10'000'000'000'000, -27), kilogram> {};
struct dalton :
named_scaled_unit<dalton, "Da", no_prefix, ratio(16'605'390'666'050, 10'000'000'000'000, -27), kilogram> {};
struct dim_mass : isq::dim_mass<kilogram> {};
@@ -90,181 +91,350 @@ using mass = quantity<dim_mass, U, Rep>;
inline namespace literals {
// g
constexpr auto operator"" _q_g(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<gram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_g(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<gram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_g(long double l) { return mass<gram, long double>(l); }
// yg
constexpr auto operator"" _q_yg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<yoctogram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<yoctogram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yg(long double l) { return mass<yoctogram, long double>(l); }
// zg
constexpr auto operator"" _q_zg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<zeptogram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<zeptogram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zg(long double l) { return mass<zeptogram, long double>(l); }
// ag
constexpr auto operator"" _q_ag(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<attogram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ag(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<attogram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ag(long double l) { return mass<attogram, long double>(l); }
// fg
constexpr auto operator"" _q_fg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<femtogram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<femtogram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fg(long double l) { return mass<femtogram, long double>(l); }
// pg
constexpr auto operator"" _q_pg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<picogram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<picogram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pg(long double l) { return mass<picogram, long double>(l); }
// ng
constexpr auto operator"" _q_ng(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<nanogram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ng(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<nanogram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ng(long double l) { return mass<nanogram, long double>(l); }
// ug
constexpr auto operator"" _q_ug(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<microgram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ug(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<microgram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ug(long double l) { return mass<microgram, long double>(l); }
// mg
constexpr auto operator"" _q_mg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<milligram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<milligram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mg(long double l) { return mass<milligram, long double>(l); }
// cg
constexpr auto operator"" _q_cg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<centigram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_cg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<centigram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_cg(long double l) { return mass<centigram, long double>(l); }
// dg
constexpr auto operator"" _q_dg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<decigram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<decigram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dg(long double l) { return mass<decigram, long double>(l); }
// dag
constexpr auto operator"" _q_dag(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<decagram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dag(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<decagram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dag(long double l) { return mass<decagram, long double>(l); }
// hg
constexpr auto operator"" _q_hg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<hectogram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_hg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<hectogram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_hg(long double l) { return mass<hectogram, long double>(l); }
// kg
constexpr auto operator"" _q_kg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<kilogram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<kilogram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kg(long double l) { return mass<kilogram, long double>(l); }
// Mg
constexpr auto operator"" _q_Mg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<megagram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Mg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<megagram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Mg(long double l) { return mass<megagram, long double>(l); }
// Gg
constexpr auto operator"" _q_Gg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<gigagram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Gg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<gigagram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Gg(long double l) { return mass<gigagram, long double>(l); }
// Tg
constexpr auto operator"" _q_Tg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<teragram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Tg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<teragram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Tg(long double l) { return mass<teragram, long double>(l); }
// Pg
constexpr auto operator"" _q_Pg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<petagram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Pg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<petagram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Pg(long double l) { return mass<petagram, long double>(l); }
// Eg
constexpr auto operator"" _q_Eg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<exagram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Eg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<exagram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Eg(long double l) { return mass<exagram, long double>(l); }
// Zg
constexpr auto operator"" _q_Zg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<zettagram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Zg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<zettagram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Zg(long double l) { return mass<zettagram, long double>(l); }
// Yg
constexpr auto operator"" _q_Yg(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<yottagram, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Yg(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<yottagram, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Yg(long double l) { return mass<yottagram, long double>(l); }
// t
constexpr auto operator"" _q_t(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<tonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_t(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<tonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_t(long double l) { return mass<tonne, long double>(l); }
// yt
constexpr auto operator"" _q_yt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<yoctotonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<yoctotonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yt(long double l) { return mass<yoctotonne, long double>(l); }
// zt
constexpr auto operator"" _q_zt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<zeptotonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<zeptotonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zt(long double l) { return mass<zeptotonne, long double>(l); }
// at
constexpr auto operator"" _q_at(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<attotonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_at(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<attotonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_at(long double l) { return mass<attotonne, long double>(l); }
// TODO Collides with foot
// ft
// constexpr auto operator"" _q_ft(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<femtotonne, std::int64_t>(static_cast<std::int64_t>(l)); }
// constexpr auto operator"" _q_ft(long double l) { return mass<femtotonne, long double>(l); }
// constexpr auto operator"" _q_ft(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return
// mass<femtotonne, std::int64_t>(static_cast<std::int64_t>(l)); } constexpr auto operator"" _q_ft(long double l) {
// return mass<femtotonne, long double>(l); }
// pt
constexpr auto operator"" _q_pt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<picotonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<picotonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pt(long double l) { return mass<picotonne, long double>(l); }
// nt
constexpr auto operator"" _q_nt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<nanotonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<nanotonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nt(long double l) { return mass<nanotonne, long double>(l); }
// ut
constexpr auto operator"" _q_ut(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<microtonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ut(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<microtonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ut(long double l) { return mass<microtonne, long double>(l); }
// mt
constexpr auto operator"" _q_mt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<millitonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<millitonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mt(long double l) { return mass<millitonne, long double>(l); }
// ct
constexpr auto operator"" _q_ct(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<centitonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ct(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<centitonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ct(long double l) { return mass<centitonne, long double>(l); }
// dt
constexpr auto operator"" _q_dt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<decitonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<decitonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dt(long double l) { return mass<decitonne, long double>(l); }
// dat
constexpr auto operator"" _q_dat(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<decatonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dat(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<decatonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dat(long double l) { return mass<decatonne, long double>(l); }
// ht
constexpr auto operator"" _q_ht(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<hectotonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ht(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<hectotonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ht(long double l) { return mass<hectotonne, long double>(l); }
// kt
constexpr auto operator"" _q_kt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<kilotonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<kilotonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kt(long double l) { return mass<kilotonne, long double>(l); }
// Mt
constexpr auto operator"" _q_Mt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<megatonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Mt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<megatonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Mt(long double l) { return mass<megatonne, long double>(l); }
// Gt
constexpr auto operator"" _q_Gt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<gigatonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Gt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<gigatonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Gt(long double l) { return mass<gigatonne, long double>(l); }
// Tt
constexpr auto operator"" _q_Tt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<teratonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Tt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<teratonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Tt(long double l) { return mass<teratonne, long double>(l); }
// Pt
constexpr auto operator"" _q_Pt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<petatonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Pt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<petatonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Pt(long double l) { return mass<petatonne, long double>(l); }
// Et
constexpr auto operator"" _q_Et(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<exatonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Et(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<exatonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Et(long double l) { return mass<exatonne, long double>(l); }
// Zt
constexpr auto operator"" _q_Zt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<zettatonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Zt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<zettatonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Zt(long double l) { return mass<zettatonne, long double>(l); }
// Yt
constexpr auto operator"" _q_Yt(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<yottatonne, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Yt(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<yottatonne, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Yt(long double l) { return mass<yottatonne, long double>(l); }
// Da
constexpr auto operator"" _q_Da(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return mass<dalton, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Da(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return mass<dalton, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Da(long double l) { return mass<dalton, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -323,7 +493,7 @@ using namespace mass_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -331,51 +501,94 @@ using namespace mass_references;
namespace units::aliases::isq::si::inline mass {
template<Representation Rep = double> using g = units::isq::si::mass<units::isq::si::gram, Rep>;
template<Representation Rep = double> using yg = units::isq::si::mass<units::isq::si::yoctogram, Rep>;
template<Representation Rep = double> using zg = units::isq::si::mass<units::isq::si::zeptogram, Rep>;
template<Representation Rep = double> using ag = units::isq::si::mass<units::isq::si::attogram, Rep>;
template<Representation Rep = double> using fg = units::isq::si::mass<units::isq::si::femtogram, Rep>;
template<Representation Rep = double> using pg = units::isq::si::mass<units::isq::si::picogram, Rep>;
template<Representation Rep = double> using ng = units::isq::si::mass<units::isq::si::nanogram, Rep>;
template<Representation Rep = double> using ug = units::isq::si::mass<units::isq::si::microgram, Rep>;
template<Representation Rep = double> using mg = units::isq::si::mass<units::isq::si::milligram, Rep>;
template<Representation Rep = double> using cg = units::isq::si::mass<units::isq::si::centigram, Rep>;
template<Representation Rep = double> using dg = units::isq::si::mass<units::isq::si::decigram, Rep>;
template<Representation Rep = double> using dag = units::isq::si::mass<units::isq::si::decagram, Rep>;
template<Representation Rep = double> using hg = units::isq::si::mass<units::isq::si::hectogram, Rep>;
template<Representation Rep = double> using kg = units::isq::si::mass<units::isq::si::kilogram, Rep>;
template<Representation Rep = double> using Mg = units::isq::si::mass<units::isq::si::megagram, Rep>;
template<Representation Rep = double> using Gg = units::isq::si::mass<units::isq::si::gigagram, Rep>;
template<Representation Rep = double> using Tg = units::isq::si::mass<units::isq::si::teragram, Rep>;
template<Representation Rep = double> using Pg = units::isq::si::mass<units::isq::si::petagram, Rep>;
template<Representation Rep = double> using Eg = units::isq::si::mass<units::isq::si::exagram, Rep>;
template<Representation Rep = double> using Zg = units::isq::si::mass<units::isq::si::zettagram, Rep>;
template<Representation Rep = double> using Yg = units::isq::si::mass<units::isq::si::yottagram, Rep>;
template<Representation Rep = double>
using g = units::isq::si::mass<units::isq::si::gram, Rep>;
template<Representation Rep = double>
using yg = units::isq::si::mass<units::isq::si::yoctogram, Rep>;
template<Representation Rep = double>
using zg = units::isq::si::mass<units::isq::si::zeptogram, Rep>;
template<Representation Rep = double>
using ag = units::isq::si::mass<units::isq::si::attogram, Rep>;
template<Representation Rep = double>
using fg = units::isq::si::mass<units::isq::si::femtogram, Rep>;
template<Representation Rep = double>
using pg = units::isq::si::mass<units::isq::si::picogram, Rep>;
template<Representation Rep = double>
using ng = units::isq::si::mass<units::isq::si::nanogram, Rep>;
template<Representation Rep = double>
using ug = units::isq::si::mass<units::isq::si::microgram, Rep>;
template<Representation Rep = double>
using mg = units::isq::si::mass<units::isq::si::milligram, Rep>;
template<Representation Rep = double>
using cg = units::isq::si::mass<units::isq::si::centigram, Rep>;
template<Representation Rep = double>
using dg = units::isq::si::mass<units::isq::si::decigram, Rep>;
template<Representation Rep = double>
using dag = units::isq::si::mass<units::isq::si::decagram, Rep>;
template<Representation Rep = double>
using hg = units::isq::si::mass<units::isq::si::hectogram, Rep>;
template<Representation Rep = double>
using kg = units::isq::si::mass<units::isq::si::kilogram, Rep>;
template<Representation Rep = double>
using Mg = units::isq::si::mass<units::isq::si::megagram, Rep>;
template<Representation Rep = double>
using Gg = units::isq::si::mass<units::isq::si::gigagram, Rep>;
template<Representation Rep = double>
using Tg = units::isq::si::mass<units::isq::si::teragram, Rep>;
template<Representation Rep = double>
using Pg = units::isq::si::mass<units::isq::si::petagram, Rep>;
template<Representation Rep = double>
using Eg = units::isq::si::mass<units::isq::si::exagram, Rep>;
template<Representation Rep = double>
using Zg = units::isq::si::mass<units::isq::si::zettagram, Rep>;
template<Representation Rep = double>
using Yg = units::isq::si::mass<units::isq::si::yottagram, Rep>;
template<Representation Rep = double> using t = units::isq::si::mass<units::isq::si::tonne, Rep>;
template<Representation Rep = double> using yt = units::isq::si::mass<units::isq::si::yoctotonne, Rep>;
template<Representation Rep = double> using zt = units::isq::si::mass<units::isq::si::zeptotonne, Rep>;
template<Representation Rep = double> using at = units::isq::si::mass<units::isq::si::attotonne, Rep>;
template<Representation Rep = double> using ft = units::isq::si::mass<units::isq::si::femtotonne, Rep>;
template<Representation Rep = double> using pt = units::isq::si::mass<units::isq::si::picotonne, Rep>;
template<Representation Rep = double> using nt = units::isq::si::mass<units::isq::si::nanotonne, Rep>;
template<Representation Rep = double> using ut = units::isq::si::mass<units::isq::si::microtonne, Rep>;
template<Representation Rep = double> using mt = units::isq::si::mass<units::isq::si::millitonne, Rep>;
template<Representation Rep = double> using ct = units::isq::si::mass<units::isq::si::centitonne, Rep>;
template<Representation Rep = double> using dt = units::isq::si::mass<units::isq::si::decitonne, Rep>;
template<Representation Rep = double> using dat = units::isq::si::mass<units::isq::si::decatonne, Rep>;
template<Representation Rep = double> using ht = units::isq::si::mass<units::isq::si::hectotonne, Rep>;
template<Representation Rep = double> using kt = units::isq::si::mass<units::isq::si::kilotonne, Rep>;
template<Representation Rep = double> using Mt = units::isq::si::mass<units::isq::si::megatonne, Rep>;
template<Representation Rep = double> using Gt = units::isq::si::mass<units::isq::si::gigatonne, Rep>;
template<Representation Rep = double> using Tt = units::isq::si::mass<units::isq::si::teratonne, Rep>;
template<Representation Rep = double> using Pt = units::isq::si::mass<units::isq::si::petatonne, Rep>;
template<Representation Rep = double> using Et = units::isq::si::mass<units::isq::si::exatonne, Rep>;
template<Representation Rep = double> using Zt = units::isq::si::mass<units::isq::si::zettatonne, Rep>;
template<Representation Rep = double> using Yt = units::isq::si::mass<units::isq::si::yottatonne, Rep>;
template<Representation Rep = double> using Da = units::isq::si::mass<units::isq::si::dalton, Rep>;
template<Representation Rep = double>
using t = units::isq::si::mass<units::isq::si::tonne, Rep>;
template<Representation Rep = double>
using yt = units::isq::si::mass<units::isq::si::yoctotonne, Rep>;
template<Representation Rep = double>
using zt = units::isq::si::mass<units::isq::si::zeptotonne, Rep>;
template<Representation Rep = double>
using at = units::isq::si::mass<units::isq::si::attotonne, Rep>;
template<Representation Rep = double>
using ft = units::isq::si::mass<units::isq::si::femtotonne, Rep>;
template<Representation Rep = double>
using pt = units::isq::si::mass<units::isq::si::picotonne, Rep>;
template<Representation Rep = double>
using nt = units::isq::si::mass<units::isq::si::nanotonne, Rep>;
template<Representation Rep = double>
using ut = units::isq::si::mass<units::isq::si::microtonne, Rep>;
template<Representation Rep = double>
using mt = units::isq::si::mass<units::isq::si::millitonne, Rep>;
template<Representation Rep = double>
using ct = units::isq::si::mass<units::isq::si::centitonne, Rep>;
template<Representation Rep = double>
using dt = units::isq::si::mass<units::isq::si::decitonne, Rep>;
template<Representation Rep = double>
using dat = units::isq::si::mass<units::isq::si::decatonne, Rep>;
template<Representation Rep = double>
using ht = units::isq::si::mass<units::isq::si::hectotonne, Rep>;
template<Representation Rep = double>
using kt = units::isq::si::mass<units::isq::si::kilotonne, Rep>;
template<Representation Rep = double>
using Mt = units::isq::si::mass<units::isq::si::megatonne, Rep>;
template<Representation Rep = double>
using Gt = units::isq::si::mass<units::isq::si::gigatonne, Rep>;
template<Representation Rep = double>
using Tt = units::isq::si::mass<units::isq::si::teratonne, Rep>;
template<Representation Rep = double>
using Pt = units::isq::si::mass<units::isq::si::petatonne, Rep>;
template<Representation Rep = double>
using Et = units::isq::si::mass<units::isq::si::exatonne, Rep>;
template<Representation Rep = double>
using Zt = units::isq::si::mass<units::isq::si::zettatonne, Rep>;
template<Representation Rep = double>
using Yt = units::isq::si::mass<units::isq::si::yottatonne, Rep>;
template<Representation Rep = double>
using Da = units::isq::si::mass<units::isq::si::dalton, Rep>;
} // namespace units::aliases::isq::si::inline mass
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -45,12 +45,16 @@ using momentum = quantity<dim_momentum, U, Rep>;
inline namespace literals {
// kg*m/s
constexpr auto operator"" _q_kg_m_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return momentum<kilogram_metre_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kg_m_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return momentum<kilogram_metre_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kg_m_per_s(long double l) { return momentum<kilogram_metre_per_second, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -58,8 +62,9 @@ constexpr auto operator"" _q_kg_m_per_s(long double l) { return momentum<kilogra
namespace units::aliases::isq::si::inline momentum {
template<Representation Rep = double> using kg_m_per_s = units::isq::si::momentum<units::isq::si::kilogram_metre_per_second, Rep>;
template<Representation Rep = double>
using kg_m_per_s = units::isq::si::momentum<units::isq::si::kilogram_metre_per_second, Rep>;
} // namespace units::aliases::isq::si::inline momentum
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -46,12 +46,16 @@ using permeability = quantity<dim_permeability, U, Rep>;
inline namespace literals {
// H/m
constexpr auto operator"" _q_H_per_m(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return permeability<henry_per_metre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_H_per_m(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return permeability<henry_per_metre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_H_per_m(long double l) { return permeability<henry_per_metre, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -59,8 +63,9 @@ constexpr auto operator"" _q_H_per_m(long double l) { return permeability<henry_
namespace units::aliases::isq::si::inline permeability {
template<Representation Rep = double> using H_per_m = units::isq::si::permeability<units::isq::si::henry_per_metre, Rep>;
template<Representation Rep = double>
using H_per_m = units::isq::si::permeability<units::isq::si::henry_per_metre, Rep>;
} // namespace units::aliases::isq::si::inline permeability
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -46,12 +46,16 @@ using permittivity = quantity<dim_permittivity, U, Rep>;
inline namespace literals {
// F/m
constexpr auto operator"" _q_F_per_m(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return permittivity<farad_per_metre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_F_per_m(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return permittivity<farad_per_metre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_F_per_m(long double l) { return permittivity<farad_per_metre, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -59,8 +63,9 @@ constexpr auto operator"" _q_F_per_m(long double l) { return permittivity<farad_
namespace units::aliases::isq::si::inline permittivity {
template<Representation Rep = double> using F_per_m = units::isq::si::permittivity<units::isq::si::farad_per_metre, Rep>;
template<Representation Rep = double>
using F_per_m = units::isq::si::permittivity<units::isq::si::farad_per_metre, Rep>;
} // namespace units::aliases::isq::si::inline permittivity
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
+122 -37
View File
@@ -63,76 +63,144 @@ using power = quantity<dim_power, U, Rep>;
inline namespace literals {
// W
constexpr auto operator"" _q_W(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<watt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_W(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<watt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_W(long double l) { return power<watt, long double>(l); }
// yW
constexpr auto operator"" _q_yW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<yoctowatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<yoctowatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yW(long double l) { return power<yoctowatt, long double>(l); }
// zW
constexpr auto operator"" _q_zW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<zeptowatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<zeptowatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zW(long double l) { return power<zeptowatt, long double>(l); }
// aW
constexpr auto operator"" _q_aW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<attowatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_aW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<attowatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_aW(long double l) { return power<attowatt, long double>(l); }
// fW
constexpr auto operator"" _q_fW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<femtowatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<femtowatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fW(long double l) { return power<femtowatt, long double>(l); }
// pW
constexpr auto operator"" _q_pW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<picowatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<picowatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pW(long double l) { return power<picowatt, long double>(l); }
// nW
constexpr auto operator"" _q_nW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<nanowatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<nanowatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nW(long double l) { return power<nanowatt, long double>(l); }
// uW
constexpr auto operator"" _q_uW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<microwatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_uW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<microwatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_uW(long double l) { return power<microwatt, long double>(l); }
// mW
constexpr auto operator"" _q_mW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<milliwatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<milliwatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mW(long double l) { return power<milliwatt, long double>(l); }
// kW
constexpr auto operator"" _q_kW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<kilowatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<kilowatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kW(long double l) { return power<kilowatt, long double>(l); }
// MW
constexpr auto operator"" _q_MW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<megawatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<megawatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MW(long double l) { return power<megawatt, long double>(l); }
// GW
constexpr auto operator"" _q_GW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<gigawatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<gigawatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GW(long double l) { return power<gigawatt, long double>(l); }
// TW
constexpr auto operator"" _q_TW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<terawatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<terawatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TW(long double l) { return power<terawatt, long double>(l); }
// PW
constexpr auto operator"" _q_PW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<petawatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<petawatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PW(long double l) { return power<petawatt, long double>(l); }
// EW
constexpr auto operator"" _q_EW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<exawatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_EW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<exawatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_EW(long double l) { return power<exawatt, long double>(l); }
// ZW
constexpr auto operator"" _q_ZW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<zettawatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<zettawatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZW(long double l) { return power<zettawatt, long double>(l); }
// YW
constexpr auto operator"" _q_YW(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return power<yottawatt, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YW(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return power<yottawatt, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YW(long double l) { return power<yottawatt, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -164,7 +232,7 @@ using namespace power_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -172,24 +240,41 @@ using namespace power_references;
namespace units::aliases::isq::si::inline power {
template<Representation Rep = double> using W = units::isq::si::power<units::isq::si::watt, Rep>;
template<Representation Rep = double> using yW = units::isq::si::power<units::isq::si::yoctowatt, Rep>;
template<Representation Rep = double> using zW = units::isq::si::power<units::isq::si::zeptowatt, Rep>;
template<Representation Rep = double> using aW = units::isq::si::power<units::isq::si::attowatt, Rep>;
template<Representation Rep = double> using fW = units::isq::si::power<units::isq::si::femtowatt, Rep>;
template<Representation Rep = double> using pW = units::isq::si::power<units::isq::si::picowatt, Rep>;
template<Representation Rep = double> using nW = units::isq::si::power<units::isq::si::nanowatt, Rep>;
template<Representation Rep = double> using uW = units::isq::si::power<units::isq::si::microwatt, Rep>;
template<Representation Rep = double> using mW = units::isq::si::power<units::isq::si::milliwatt, Rep>;
template<Representation Rep = double> using kW = units::isq::si::power<units::isq::si::kilowatt, Rep>;
template<Representation Rep = double> using MW = units::isq::si::power<units::isq::si::megawatt, Rep>;
template<Representation Rep = double> using GW = units::isq::si::power<units::isq::si::gigawatt, Rep>;
template<Representation Rep = double> using TW = units::isq::si::power<units::isq::si::terawatt, Rep>;
template<Representation Rep = double> using PW = units::isq::si::power<units::isq::si::petawatt, Rep>;
template<Representation Rep = double> using EW = units::isq::si::power<units::isq::si::exawatt, Rep>;
template<Representation Rep = double> using ZW = units::isq::si::power<units::isq::si::zettawatt, Rep>;
template<Representation Rep = double> using YW = units::isq::si::power<units::isq::si::yottawatt, Rep>;
template<Representation Rep = double>
using W = units::isq::si::power<units::isq::si::watt, Rep>;
template<Representation Rep = double>
using yW = units::isq::si::power<units::isq::si::yoctowatt, Rep>;
template<Representation Rep = double>
using zW = units::isq::si::power<units::isq::si::zeptowatt, Rep>;
template<Representation Rep = double>
using aW = units::isq::si::power<units::isq::si::attowatt, Rep>;
template<Representation Rep = double>
using fW = units::isq::si::power<units::isq::si::femtowatt, Rep>;
template<Representation Rep = double>
using pW = units::isq::si::power<units::isq::si::picowatt, Rep>;
template<Representation Rep = double>
using nW = units::isq::si::power<units::isq::si::nanowatt, Rep>;
template<Representation Rep = double>
using uW = units::isq::si::power<units::isq::si::microwatt, Rep>;
template<Representation Rep = double>
using mW = units::isq::si::power<units::isq::si::milliwatt, Rep>;
template<Representation Rep = double>
using kW = units::isq::si::power<units::isq::si::kilowatt, Rep>;
template<Representation Rep = double>
using MW = units::isq::si::power<units::isq::si::megawatt, Rep>;
template<Representation Rep = double>
using GW = units::isq::si::power<units::isq::si::gigawatt, Rep>;
template<Representation Rep = double>
using TW = units::isq::si::power<units::isq::si::terawatt, Rep>;
template<Representation Rep = double>
using PW = units::isq::si::power<units::isq::si::petawatt, Rep>;
template<Representation Rep = double>
using EW = units::isq::si::power<units::isq::si::exawatt, Rep>;
template<Representation Rep = double>
using ZW = units::isq::si::power<units::isq::si::zettawatt, Rep>;
template<Representation Rep = double>
using YW = units::isq::si::power<units::isq::si::yottawatt, Rep>;
} // namespace units::aliases::isq::si::inline power
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
+123 -38
View File
@@ -29,9 +29,9 @@
#include <units/symbol_text.h>
// IWYU pragma: end_exports
#include <units/isq/si/voltage.h>
#include <units/isq/si/electric_current.h>
#include <units/isq/si/prefixes.h>
#include <units/isq/si/voltage.h>
#include <units/unit.h>
namespace units::isq::si {
@@ -64,76 +64,144 @@ using resistance = quantity<dim_resistance, U, Rep>;
inline namespace literals {
// R
constexpr auto operator"" _q_R(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<ohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_R(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<ohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_R(long double l) { return resistance<ohm, long double>(l); }
// yR
constexpr auto operator"" _q_yR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<yoctoohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<yoctoohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yR(long double l) { return resistance<yoctoohm, long double>(l); }
// zR
constexpr auto operator"" _q_zR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<zeptoohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<zeptoohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zR(long double l) { return resistance<zeptoohm, long double>(l); }
// aR
constexpr auto operator"" _q_aR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<attoohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_aR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<attoohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_aR(long double l) { return resistance<attoohm, long double>(l); }
// fR
constexpr auto operator"" _q_fR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<femtoohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<femtoohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fR(long double l) { return resistance<femtoohm, long double>(l); }
// pR
constexpr auto operator"" _q_pR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<picoohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<picoohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pR(long double l) { return resistance<picoohm, long double>(l); }
// nR
constexpr auto operator"" _q_nR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<nanoohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<nanoohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nR(long double l) { return resistance<nanoohm, long double>(l); }
// uR
constexpr auto operator"" _q_uR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<microohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_uR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<microohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_uR(long double l) { return resistance<microohm, long double>(l); }
// mR
constexpr auto operator"" _q_mR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<milliohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<milliohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mR(long double l) { return resistance<milliohm, long double>(l); }
// kR
constexpr auto operator"" _q_kR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<kiloohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<kiloohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kR(long double l) { return resistance<kiloohm, long double>(l); }
// MR
constexpr auto operator"" _q_MR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<megaohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_MR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<megaohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_MR(long double l) { return resistance<megaohm, long double>(l); }
// GR
constexpr auto operator"" _q_GR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<gigaohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_GR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<gigaohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_GR(long double l) { return resistance<gigaohm, long double>(l); }
// TR
constexpr auto operator"" _q_TR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<teraohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_TR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<teraohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_TR(long double l) { return resistance<teraohm, long double>(l); }
// PR
constexpr auto operator"" _q_PR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<petaohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_PR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<petaohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_PR(long double l) { return resistance<petaohm, long double>(l); }
// ER
constexpr auto operator"" _q_ER(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<exaohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ER(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<exaohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ER(long double l) { return resistance<exaohm, long double>(l); }
// ZR
constexpr auto operator"" _q_ZR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<zettaohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ZR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<zettaohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ZR(long double l) { return resistance<zettaohm, long double>(l); }
// YR
constexpr auto operator"" _q_YR(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return resistance<yottaohm, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_YR(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return resistance<yottaohm, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_YR(long double l) { return resistance<yottaohm, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -165,7 +233,7 @@ using namespace resistance_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -173,24 +241,41 @@ using namespace resistance_references;
namespace units::aliases::isq::si::inline resistance {
template<Representation Rep = double> using R = units::isq::si::resistance<units::isq::si::ohm, Rep>;
template<Representation Rep = double> using yR = units::isq::si::resistance<units::isq::si::yoctoohm, Rep>;
template<Representation Rep = double> using zR = units::isq::si::resistance<units::isq::si::zeptoohm, Rep>;
template<Representation Rep = double> using aR = units::isq::si::resistance<units::isq::si::attoohm, Rep>;
template<Representation Rep = double> using fR = units::isq::si::resistance<units::isq::si::femtoohm, Rep>;
template<Representation Rep = double> using pR = units::isq::si::resistance<units::isq::si::picoohm, Rep>;
template<Representation Rep = double> using nR = units::isq::si::resistance<units::isq::si::nanoohm, Rep>;
template<Representation Rep = double> using uR = units::isq::si::resistance<units::isq::si::microohm, Rep>;
template<Representation Rep = double> using mR = units::isq::si::resistance<units::isq::si::milliohm, Rep>;
template<Representation Rep = double> using kR = units::isq::si::resistance<units::isq::si::kiloohm, Rep>;
template<Representation Rep = double> using MR = units::isq::si::resistance<units::isq::si::megaohm, Rep>;
template<Representation Rep = double> using GR = units::isq::si::resistance<units::isq::si::gigaohm, Rep>;
template<Representation Rep = double> using TR = units::isq::si::resistance<units::isq::si::teraohm, Rep>;
template<Representation Rep = double> using PR = units::isq::si::resistance<units::isq::si::petaohm, Rep>;
template<Representation Rep = double> using ER = units::isq::si::resistance<units::isq::si::exaohm, Rep>;
template<Representation Rep = double> using ZR = units::isq::si::resistance<units::isq::si::zettaohm, Rep>;
template<Representation Rep = double> using YR = units::isq::si::resistance<units::isq::si::yottaohm, Rep>;
template<Representation Rep = double>
using R = units::isq::si::resistance<units::isq::si::ohm, Rep>;
template<Representation Rep = double>
using yR = units::isq::si::resistance<units::isq::si::yoctoohm, Rep>;
template<Representation Rep = double>
using zR = units::isq::si::resistance<units::isq::si::zeptoohm, Rep>;
template<Representation Rep = double>
using aR = units::isq::si::resistance<units::isq::si::attoohm, Rep>;
template<Representation Rep = double>
using fR = units::isq::si::resistance<units::isq::si::femtoohm, Rep>;
template<Representation Rep = double>
using pR = units::isq::si::resistance<units::isq::si::picoohm, Rep>;
template<Representation Rep = double>
using nR = units::isq::si::resistance<units::isq::si::nanoohm, Rep>;
template<Representation Rep = double>
using uR = units::isq::si::resistance<units::isq::si::microohm, Rep>;
template<Representation Rep = double>
using mR = units::isq::si::resistance<units::isq::si::milliohm, Rep>;
template<Representation Rep = double>
using kR = units::isq::si::resistance<units::isq::si::kiloohm, Rep>;
template<Representation Rep = double>
using MR = units::isq::si::resistance<units::isq::si::megaohm, Rep>;
template<Representation Rep = double>
using GR = units::isq::si::resistance<units::isq::si::gigaohm, Rep>;
template<Representation Rep = double>
using TR = units::isq::si::resistance<units::isq::si::teraohm, Rep>;
template<Representation Rep = double>
using PR = units::isq::si::resistance<units::isq::si::petaohm, Rep>;
template<Representation Rep = double>
using ER = units::isq::si::resistance<units::isq::si::exaohm, Rep>;
template<Representation Rep = double>
using ZR = units::isq::si::resistance<units::isq::si::zettaohm, Rep>;
template<Representation Rep = double>
using YR = units::isq::si::resistance<units::isq::si::yottaohm, Rep>;
} // namespace units::aliases::isq::si::inline resistance
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
+9 -11
View File
@@ -23,16 +23,9 @@
#pragma once
// IWYU pragma: begin_exports
#include <units/isq/si/electric_current.h>
#include <units/isq/si/length.h>
#include <units/isq/si/luminous_intensity.h>
#include <units/isq/si/mass.h>
#include <units/isq/si/amount_of_substance.h>
#include <units/isq/si/thermodynamic_temperature.h>
#include <units/isq/si/time.h>
#include <units/isq/si/absorbed_dose.h>
#include <units/isq/si/acceleration.h>
#include <units/isq/si/amount_of_substance.h>
#include <units/isq/si/angular_velocity.h>
#include <units/isq/si/area.h>
#include <units/isq/si/capacitance.h>
@@ -44,8 +37,14 @@
#include <units/isq/si/density.h>
#include <units/isq/si/dynamic_viscosity.h>
#include <units/isq/si/electric_charge.h>
#include <units/isq/si/electric_current.h>
#include <units/isq/si/electric_field_strength.h>
#include <units/isq/si/energy.h>
#include <units/isq/si/length.h>
#include <units/isq/si/luminous_intensity.h>
#include <units/isq/si/mass.h>
#include <units/isq/si/thermodynamic_temperature.h>
#include <units/isq/si/time.h>
// TODO Add when downcasting issue is solved (collides with pressure)
// #include <units/isq/si/energy_density.h>
#include <units/isq/si/force.h>
@@ -63,6 +62,8 @@
#include <units/isq/si/pressure.h>
// TODO Add when downcasting issue is solved (collides with frequency)
// #include <units/isq/si/radioactivity.h>
#include <units/isq/si/constants.h>
#include <units/isq/si/prefixes.h>
#include <units/isq/si/resistance.h>
#include <units/isq/si/speed.h>
#include <units/isq/si/surface_tension.h>
@@ -70,7 +71,4 @@
#include <units/isq/si/torque.h>
#include <units/isq/si/voltage.h>
#include <units/isq/si/volume.h>
#include <units/isq/si/constants.h>
#include <units/isq/si/prefixes.h>
// IWYU pragma: end_exports
+16 -6
View File
@@ -47,16 +47,24 @@ using speed = quantity<dim_speed, U, Rep>;
inline namespace literals {
// m/s
constexpr auto operator"" _q_m_per_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return speed<metre_per_second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_m_per_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return speed<metre_per_second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_m_per_s(long double l) { return speed<metre_per_second, long double>(l); }
// km/h
constexpr auto operator"" _q_km_per_h(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return speed<kilometre_per_hour, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_km_per_h(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return speed<kilometre_per_hour, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_km_per_h(long double l) { return speed<kilometre_per_hour, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -64,9 +72,11 @@ constexpr auto operator"" _q_km_per_h(long double l) { return speed<kilometre_pe
namespace units::aliases::isq::si::inline speed {
template<Representation Rep = double> using m_per_s = units::isq::si::speed<units::isq::si::metre_per_second, Rep>;
template<Representation Rep = double> using km_per_h = units::isq::si::speed<units::isq::si::kilometre_per_hour, Rep>;
template<Representation Rep = double>
using m_per_s = units::isq::si::speed<units::isq::si::metre_per_second, Rep>;
template<Representation Rep = double>
using km_per_h = units::isq::si::speed<units::isq::si::kilometre_per_hour, Rep>;
} // namespace units::aliases::isq::si::inline speed
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -45,12 +45,16 @@ using surface_tension = quantity<dim_surface_tension, U, Rep>;
inline namespace literals {
// N/m
constexpr auto operator"" _q_N_per_m(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return surface_tension<newton_per_metre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_N_per_m(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return surface_tension<newton_per_metre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_N_per_m(long double l) { return surface_tension<newton_per_metre, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -58,8 +62,9 @@ constexpr auto operator"" _q_N_per_m(long double l) { return surface_tension<new
namespace units::aliases::isq::si::inline surface_tension {
template<Representation Rep = double> using N_per_m = units::isq::si::surface_tension<units::isq::si::newton_per_metre, Rep>;
template<Representation Rep = double>
using N_per_m = units::isq::si::surface_tension<units::isq::si::newton_per_metre, Rep>;
} // namespace units::aliases::isq::si::inline surface_tension
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -36,7 +36,9 @@ namespace units::isq::si {
struct watt_per_metre_kelvin : unit<watt_per_metre_kelvin> {};
struct dim_thermal_conductivity : isq::dim_thermal_conductivity<dim_thermal_conductivity, watt_per_metre_kelvin, dim_power, dim_length, dim_thermodynamic_temperature> {};
struct dim_thermal_conductivity :
isq::dim_thermal_conductivity<dim_thermal_conductivity, watt_per_metre_kelvin, dim_power, dim_length,
dim_thermodynamic_temperature> {};
template<UnitOf<dim_thermal_conductivity> U, Representation Rep = double>
using thermal_conductivity = quantity<dim_thermal_conductivity, U, Rep>;
@@ -46,12 +48,19 @@ using thermal_conductivity = quantity<dim_thermal_conductivity, U, Rep>;
inline namespace literals {
// W/(m K)
constexpr auto operator"" _q_W_per_m_K(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return thermal_conductivity<watt_per_metre_kelvin, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_W_per_m_K(long double l) { return thermal_conductivity<watt_per_metre_kelvin, long double>(l); }
constexpr auto operator"" _q_W_per_m_K(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return thermal_conductivity<watt_per_metre_kelvin, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_W_per_m_K(long double l)
{
return thermal_conductivity<watt_per_metre_kelvin, long double>(l);
}
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -59,8 +68,9 @@ constexpr auto operator"" _q_W_per_m_K(long double l) { return thermal_conductiv
namespace units::aliases::isq::si::inline thermal_conductivity {
template<Representation Rep = double> using W_per_m_K = units::isq::si::thermal_conductivity<units::isq::si::watt_per_metre_kelvin, Rep>;
template<Representation Rep = double>
using W_per_m_K = units::isq::si::thermal_conductivity<units::isq::si::watt_per_metre_kelvin, Rep>;
} // namespace units::aliases::isq::si::inline thermal_conductivity
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
@@ -45,12 +45,16 @@ using thermodynamic_temperature = quantity<dim_thermodynamic_temperature, U, Rep
inline namespace literals {
// K
constexpr auto operator"" _q_K(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return thermodynamic_temperature<kelvin, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_K(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return thermodynamic_temperature<kelvin, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_K(long double l) { return thermodynamic_temperature<kelvin, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -66,7 +70,7 @@ using namespace thermodynamic_temperature_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -74,8 +78,9 @@ using namespace thermodynamic_temperature_references;
namespace units::aliases::isq::si::inline thermodynamic_temperature {
template<Representation Rep = double> using K = units::isq::si::thermodynamic_temperature<units::isq::si::kelvin, Rep>;
template<Representation Rep = double>
using K = units::isq::si::thermodynamic_temperature<units::isq::si::kelvin, Rep>;
} // namespace units::aliases::isq::si::inline thermodynamic_temperature
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
+88 -28
View File
@@ -57,56 +57,104 @@ using time = quantity<dim_time, U, Rep>;
inline namespace literals {
// ys
constexpr auto operator"" _q_ys(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<yoctosecond, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ys(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<yoctosecond, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ys(long double l) { return time<yoctosecond, long double>(l); }
// zs
constexpr auto operator"" _q_zs(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<zeptosecond, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zs(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<zeptosecond, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zs(long double l) { return time<zeptosecond, long double>(l); }
// as
constexpr auto operator"" _q_as(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<attosecond, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_as(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<attosecond, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_as(long double l) { return time<attosecond, long double>(l); }
// fs
constexpr auto operator"" _q_fs(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<femtosecond, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fs(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<femtosecond, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fs(long double l) { return time<femtosecond, long double>(l); }
// ps
constexpr auto operator"" _q_ps(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<picosecond, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ps(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<picosecond, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ps(long double l) { return time<picosecond, long double>(l); }
// ns
constexpr auto operator"" _q_ns(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<nanosecond, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ns(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<nanosecond, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ns(long double l) { return time<nanosecond, long double>(l); }
// us
constexpr auto operator"" _q_us(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<microsecond, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_us(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<microsecond, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_us(long double l) { return time<microsecond, long double>(l); }
// ms
constexpr auto operator"" _q_ms(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<millisecond, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ms(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<millisecond, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ms(long double l) { return time<millisecond, long double>(l); }
// s
constexpr auto operator"" _q_s(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<second, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_s(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<second, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_s(long double l) { return time<second, long double>(l); }
// min
constexpr auto operator"" _q_min(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<minute, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_min(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<minute, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_min(long double l) { return time<minute, long double>(l); }
// h
constexpr auto operator"" _q_h(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<hour, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_h(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<hour, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_h(long double l) { return time<hour, long double>(l); }
// d
constexpr auto operator"" _q_d(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return time<day, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_d(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return time<day, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_d(long double l) { return time<day, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -131,9 +179,9 @@ namespace references {
using namespace time_references;
} // namespace references
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -141,19 +189,31 @@ using namespace time_references;
namespace units::aliases::isq::si::inline time {
template<Representation Rep = double> using ys = units::isq::si::time<units::isq::si::yoctosecond, Rep>;
template<Representation Rep = double> using zs = units::isq::si::time<units::isq::si::zeptosecond, Rep>;
template<Representation Rep = double> using as = units::isq::si::time<units::isq::si::attosecond, Rep>;
template<Representation Rep = double> using fs = units::isq::si::time<units::isq::si::femtosecond, Rep>;
template<Representation Rep = double> using ps = units::isq::si::time<units::isq::si::picosecond, Rep>;
template<Representation Rep = double> using ns = units::isq::si::time<units::isq::si::nanosecond, Rep>;
template<Representation Rep = double> using us = units::isq::si::time<units::isq::si::microsecond, Rep>;
template<Representation Rep = double> using ms = units::isq::si::time<units::isq::si::millisecond, Rep>;
template<Representation Rep = double> using s = units::isq::si::time<units::isq::si::second, Rep>;
template<Representation Rep = double> using min = units::isq::si::time<units::isq::si::minute, Rep>;
template<Representation Rep = double> using h = units::isq::si::time<units::isq::si::hour, Rep>;
template<Representation Rep = double> using d = units::isq::si::time<units::isq::si::day, Rep>;
template<Representation Rep = double>
using ys = units::isq::si::time<units::isq::si::yoctosecond, Rep>;
template<Representation Rep = double>
using zs = units::isq::si::time<units::isq::si::zeptosecond, Rep>;
template<Representation Rep = double>
using as = units::isq::si::time<units::isq::si::attosecond, Rep>;
template<Representation Rep = double>
using fs = units::isq::si::time<units::isq::si::femtosecond, Rep>;
template<Representation Rep = double>
using ps = units::isq::si::time<units::isq::si::picosecond, Rep>;
template<Representation Rep = double>
using ns = units::isq::si::time<units::isq::si::nanosecond, Rep>;
template<Representation Rep = double>
using us = units::isq::si::time<units::isq::si::microsecond, Rep>;
template<Representation Rep = double>
using ms = units::isq::si::time<units::isq::si::millisecond, Rep>;
template<Representation Rep = double>
using s = units::isq::si::time<units::isq::si::second, Rep>;
template<Representation Rep = double>
using min = units::isq::si::time<units::isq::si::minute, Rep>;
template<Representation Rep = double>
using h = units::isq::si::time<units::isq::si::hour, Rep>;
template<Representation Rep = double>
using d = units::isq::si::time<units::isq::si::day, Rep>;
} // namespace units::aliases::isq::si::inline time
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
+10 -5
View File
@@ -28,8 +28,8 @@
#include <units/symbol_text.h>
// IWYU pragma: end_exports
#include <units/isq/si/energy.h>
#include <units/generic/angle.h>
#include <units/isq/si/energy.h>
#include <units/isq/si/prefixes.h>
#include <units/unit.h>
@@ -47,12 +47,16 @@ using torque = quantity<dim_torque, U, Rep>;
inline namespace literals {
// Nm
constexpr auto operator"" _q_N_m_per_rad(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return torque<newton_metre_per_radian, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_N_m_per_rad(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return torque<newton_metre_per_radian, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_N_m_per_rad(long double l) { return torque<newton_metre_per_radian, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
} // namespace units::isq::si
@@ -60,8 +64,9 @@ constexpr auto operator"" _q_N_m_per_rad(long double l) { return torque<newton_m
namespace units::aliases::isq::si::inline torque {
template<Representation Rep = double> using N_m_per_rad = units::isq::si::torque<units::isq::si::newton_metre_per_radian, Rep>;
template<Representation Rep = double>
using N_m_per_rad = units::isq::si::torque<units::isq::si::newton_metre_per_radian, Rep>;
} // namespace units::aliases::isq::si::inline torque
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES
+297 -87
View File
@@ -88,176 +88,344 @@ using volume = quantity<dim_volume, U, Rep>;
inline namespace literals {
// m3
constexpr auto operator"" _q_m3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_metre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_m3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_metre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_m3(long double l) { return volume<cubic_metre, long double>(l); }
// ym3
constexpr auto operator"" _q_ym3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_yoctometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ym3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_yoctometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ym3(long double l) { return volume<cubic_yoctometre, long double>(l); }
// zm3
constexpr auto operator"" _q_zm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_zeptometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_zeptometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zm3(long double l) { return volume<cubic_zeptometre, long double>(l); }
// am3
constexpr auto operator"" _q_am3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_attometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_am3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_attometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_am3(long double l) { return volume<cubic_attometre, long double>(l); }
// fm3
constexpr auto operator"" _q_fm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_femtometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_femtometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fm3(long double l) { return volume<cubic_femtometre, long double>(l); }
// pm3
constexpr auto operator"" _q_pm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_picometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_picometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pm3(long double l) { return volume<cubic_picometre, long double>(l); }
// nm3
constexpr auto operator"" _q_nm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_nanometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_nanometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nm3(long double l) { return volume<cubic_nanometre, long double>(l); }
// um3
constexpr auto operator"" _q_um3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_micrometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_um3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_micrometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_um3(long double l) { return volume<cubic_micrometre, long double>(l); }
// mm3
constexpr auto operator"" _q_mm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_millimetre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_mm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_millimetre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_mm3(long double l) { return volume<cubic_millimetre, long double>(l); }
// cm3
constexpr auto operator"" _q_cm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_centimetre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_cm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_centimetre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_cm3(long double l) { return volume<cubic_centimetre, long double>(l); }
// dm3
constexpr auto operator"" _q_dm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_decimetre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_decimetre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dm3(long double l) { return volume<cubic_decimetre, long double>(l); }
// dam3
constexpr auto operator"" _q_dam3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_decametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dam3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_decametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dam3(long double l) { return volume<cubic_decametre, long double>(l); }
// hm3
constexpr auto operator"" _q_hm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_hectometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_hm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_hectometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_hm3(long double l) { return volume<cubic_hectometre, long double>(l); }
// km3
constexpr auto operator"" _q_km3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_kilometre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_km3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_kilometre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_km3(long double l) { return volume<cubic_kilometre, long double>(l); }
// Mm3
constexpr auto operator"" _q_Mm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_megametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Mm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_megametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Mm3(long double l) { return volume<cubic_megametre, long double>(l); }
// Gm3
constexpr auto operator"" _q_Gm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_gigametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Gm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_gigametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Gm3(long double l) { return volume<cubic_gigametre, long double>(l); }
// Tm3
constexpr auto operator"" _q_Tm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_terametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Tm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_terametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Tm3(long double l) { return volume<cubic_terametre, long double>(l); }
// Pm3
constexpr auto operator"" _q_Pm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_petametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Pm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_petametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Pm3(long double l) { return volume<cubic_petametre, long double>(l); }
// Em3
constexpr auto operator"" _q_Em3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_exametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Em3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_exametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Em3(long double l) { return volume<cubic_exametre, long double>(l); }
// Zm3
constexpr auto operator"" _q_Zm3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_zettametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Zm3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_zettametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Zm3(long double l) { return volume<cubic_zettametre, long double>(l); }
// Ym3
constexpr auto operator"" _q_Ym3(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<cubic_yottametre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Ym3(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<cubic_yottametre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Ym3(long double l) { return volume<cubic_yottametre, long double>(l); }
// l
constexpr auto operator"" _q_l(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<litre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_l(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<litre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_l(long double l) { return volume<litre, long double>(l); }
// yl
constexpr auto operator"" _q_yl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<yoctolitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_yl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<yoctolitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_yl(long double l) { return volume<yoctolitre, long double>(l); }
// zl
constexpr auto operator"" _q_zl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<zeptolitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_zl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<zeptolitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_zl(long double l) { return volume<zeptolitre, long double>(l); }
// al
constexpr auto operator"" _q_al(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<attolitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_al(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<attolitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_al(long double l) { return volume<attolitre, long double>(l); }
// fl
constexpr auto operator"" _q_fl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<femtolitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_fl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<femtolitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_fl(long double l) { return volume<femtolitre, long double>(l); }
// pl
constexpr auto operator"" _q_pl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<picolitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_pl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<picolitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_pl(long double l) { return volume<picolitre, long double>(l); }
// nl
constexpr auto operator"" _q_nl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<nanolitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_nl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<nanolitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_nl(long double l) { return volume<nanolitre, long double>(l); }
// ul
constexpr auto operator"" _q_ul(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<microlitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ul(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<microlitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ul(long double l) { return volume<microlitre, long double>(l); }
// ml
constexpr auto operator"" _q_ml(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<millilitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_ml(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<millilitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_ml(long double l) { return volume<millilitre, long double>(l); }
// cl
constexpr auto operator"" _q_cl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<centilitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_cl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<centilitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_cl(long double l) { return volume<centilitre, long double>(l); }
// dl
constexpr auto operator"" _q_dl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<decilitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<decilitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dl(long double l) { return volume<decilitre, long double>(l); }
// dal
constexpr auto operator"" _q_dal(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<decalitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_dal(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<decalitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_dal(long double l) { return volume<decalitre, long double>(l); }
// hl
constexpr auto operator"" _q_hl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<hectolitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_hl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<hectolitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_hl(long double l) { return volume<hectolitre, long double>(l); }
// kl
constexpr auto operator"" _q_kl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<kilolitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_kl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<kilolitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_kl(long double l) { return volume<kilolitre, long double>(l); }
// Ml
constexpr auto operator"" _q_Ml(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<megalitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Ml(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<megalitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Ml(long double l) { return volume<megalitre, long double>(l); }
// Gl
constexpr auto operator"" _q_Gl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<gigalitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Gl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<gigalitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Gl(long double l) { return volume<gigalitre, long double>(l); }
// Tl
constexpr auto operator"" _q_Tl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<teralitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Tl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<teralitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Tl(long double l) { return volume<teralitre, long double>(l); }
// Pl
constexpr auto operator"" _q_Pl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<petalitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Pl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<petalitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Pl(long double l) { return volume<petalitre, long double>(l); }
// El
constexpr auto operator"" _q_El(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<exalitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_El(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<exalitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_El(long double l) { return volume<exalitre, long double>(l); }
// Zl
constexpr auto operator"" _q_Zl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<zettalitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Zl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<zettalitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Zl(long double l) { return volume<zettalitre, long double>(l); }
// Yl
constexpr auto operator"" _q_Yl(unsigned long long l) { gsl_ExpectsAudit(std::in_range<std::int64_t>(l)); return volume<yottalitre, std::int64_t>(static_cast<std::int64_t>(l)); }
constexpr auto operator"" _q_Yl(unsigned long long l)
{
gsl_ExpectsAudit(std::in_range<std::int64_t>(l));
return volume<yottalitre, std::int64_t>(static_cast<std::int64_t>(l));
}
constexpr auto operator"" _q_Yl(long double l) { return volume<yottalitre, long double>(l); }
} // namespace literals
#endif // UNITS_NO_LITERALS
#endif // UNITS_NO_LITERALS
#ifndef UNITS_NO_REFERENCES
@@ -315,7 +483,7 @@ using namespace volume_references;
} // namespace references
#endif // UNITS_NO_REFERENCES
#endif // UNITS_NO_REFERENCES
} // namespace units::isq::si
@@ -323,50 +491,92 @@ using namespace volume_references;
namespace units::aliases::isq::si::inline volume {
template<Representation Rep = double> using m3 = units::isq::si::volume<units::isq::si::cubic_metre, Rep>;
template<Representation Rep = double> using ym3 = units::isq::si::volume<units::isq::si::cubic_yoctometre, Rep>;
template<Representation Rep = double> using zm3 = units::isq::si::volume<units::isq::si::cubic_zeptometre, Rep>;
template<Representation Rep = double> using am3 = units::isq::si::volume<units::isq::si::cubic_attometre, Rep>;
template<Representation Rep = double> using fm3 = units::isq::si::volume<units::isq::si::cubic_femtometre, Rep>;
template<Representation Rep = double> using pm3 = units::isq::si::volume<units::isq::si::cubic_picometre, Rep>;
template<Representation Rep = double> using nm3 = units::isq::si::volume<units::isq::si::cubic_nanometre, Rep>;
template<Representation Rep = double> using um3 = units::isq::si::volume<units::isq::si::cubic_micrometre, Rep>;
template<Representation Rep = double> using mm3 = units::isq::si::volume<units::isq::si::cubic_millimetre, Rep>;
template<Representation Rep = double> using cm3 = units::isq::si::volume<units::isq::si::cubic_centimetre, Rep>;
template<Representation Rep = double> using dm3 = units::isq::si::volume<units::isq::si::cubic_decimetre, Rep>;
template<Representation Rep = double> using dam3 = units::isq::si::volume<units::isq::si::cubic_decametre, Rep>;
template<Representation Rep = double> using hm3 = units::isq::si::volume<units::isq::si::cubic_hectometre, Rep>;
template<Representation Rep = double> using km3 = units::isq::si::volume<units::isq::si::cubic_kilometre, Rep>;
template<Representation Rep = double> using Mm3 = units::isq::si::volume<units::isq::si::cubic_megametre, Rep>;
template<Representation Rep = double> using Gm3 = units::isq::si::volume<units::isq::si::cubic_gigametre, Rep>;
template<Representation Rep = double> using Tm3 = units::isq::si::volume<units::isq::si::cubic_terametre, Rep>;
template<Representation Rep = double> using Pm3 = units::isq::si::volume<units::isq::si::cubic_petametre, Rep>;
template<Representation Rep = double> using Em3 = units::isq::si::volume<units::isq::si::cubic_exametre, Rep>;
template<Representation Rep = double> using Zm3 = units::isq::si::volume<units::isq::si::cubic_zettametre, Rep>;
template<Representation Rep = double> using Ym3 = units::isq::si::volume<units::isq::si::cubic_yottametre, Rep>;
template<Representation Rep = double>
using m3 = units::isq::si::volume<units::isq::si::cubic_metre, Rep>;
template<Representation Rep = double>
using ym3 = units::isq::si::volume<units::isq::si::cubic_yoctometre, Rep>;
template<Representation Rep = double>
using zm3 = units::isq::si::volume<units::isq::si::cubic_zeptometre, Rep>;
template<Representation Rep = double>
using am3 = units::isq::si::volume<units::isq::si::cubic_attometre, Rep>;
template<Representation Rep = double>
using fm3 = units::isq::si::volume<units::isq::si::cubic_femtometre, Rep>;
template<Representation Rep = double>
using pm3 = units::isq::si::volume<units::isq::si::cubic_picometre, Rep>;
template<Representation Rep = double>
using nm3 = units::isq::si::volume<units::isq::si::cubic_nanometre, Rep>;
template<Representation Rep = double>
using um3 = units::isq::si::volume<units::isq::si::cubic_micrometre, Rep>;
template<Representation Rep = double>
using mm3 = units::isq::si::volume<units::isq::si::cubic_millimetre, Rep>;
template<Representation Rep = double>
using cm3 = units::isq::si::volume<units::isq::si::cubic_centimetre, Rep>;
template<Representation Rep = double>
using dm3 = units::isq::si::volume<units::isq::si::cubic_decimetre, Rep>;
template<Representation Rep = double>
using dam3 = units::isq::si::volume<units::isq::si::cubic_decametre, Rep>;
template<Representation Rep = double>
using hm3 = units::isq::si::volume<units::isq::si::cubic_hectometre, Rep>;
template<Representation Rep = double>
using km3 = units::isq::si::volume<units::isq::si::cubic_kilometre, Rep>;
template<Representation Rep = double>
using Mm3 = units::isq::si::volume<units::isq::si::cubic_megametre, Rep>;
template<Representation Rep = double>
using Gm3 = units::isq::si::volume<units::isq::si::cubic_gigametre, Rep>;
template<Representation Rep = double>
using Tm3 = units::isq::si::volume<units::isq::si::cubic_terametre, Rep>;
template<Representation Rep = double>
using Pm3 = units::isq::si::volume<units::isq::si::cubic_petametre, Rep>;
template<Representation Rep = double>
using Em3 = units::isq::si::volume<units::isq::si::cubic_exametre, Rep>;
template<Representation Rep = double>
using Zm3 = units::isq::si::volume<units::isq::si::cubic_zettametre, Rep>;
template<Representation Rep = double>
using Ym3 = units::isq::si::volume<units::isq::si::cubic_yottametre, Rep>;
template<Representation Rep = double> using l = units::isq::si::volume<units::isq::si::litre, Rep>;
template<Representation Rep = double> using yl = units::isq::si::volume<units::isq::si::yoctolitre, Rep>;
template<Representation Rep = double> using zl = units::isq::si::volume<units::isq::si::zeptolitre, Rep>;
template<Representation Rep = double> using al = units::isq::si::volume<units::isq::si::attolitre, Rep>;
template<Representation Rep = double> using fl = units::isq::si::volume<units::isq::si::femtolitre, Rep>;
template<Representation Rep = double> using pl = units::isq::si::volume<units::isq::si::picolitre, Rep>;
template<Representation Rep = double> using nl = units::isq::si::volume<units::isq::si::nanolitre, Rep>;
template<Representation Rep = double> using ul = units::isq::si::volume<units::isq::si::microlitre, Rep>;
template<Representation Rep = double> using ml = units::isq::si::volume<units::isq::si::millilitre, Rep>;
template<Representation Rep = double> using cl = units::isq::si::volume<units::isq::si::centilitre, Rep>;
template<Representation Rep = double> using dl = units::isq::si::volume<units::isq::si::decilitre, Rep>;
template<Representation Rep = double> using dal = units::isq::si::volume<units::isq::si::decalitre, Rep>;
template<Representation Rep = double> using hl = units::isq::si::volume<units::isq::si::hectolitre, Rep>;
template<Representation Rep = double> using kl = units::isq::si::volume<units::isq::si::kilolitre, Rep>;
template<Representation Rep = double> using Ml = units::isq::si::volume<units::isq::si::megalitre, Rep>;
template<Representation Rep = double> using Gl = units::isq::si::volume<units::isq::si::gigalitre, Rep>;
template<Representation Rep = double> using Tl = units::isq::si::volume<units::isq::si::teralitre, Rep>;
template<Representation Rep = double> using Pl = units::isq::si::volume<units::isq::si::petalitre, Rep>;
template<Representation Rep = double> using El = units::isq::si::volume<units::isq::si::exalitre, Rep>;
template<Representation Rep = double> using Zl = units::isq::si::volume<units::isq::si::zettalitre, Rep>;
template<Representation Rep = double> using Yl = units::isq::si::volume<units::isq::si::yottalitre, Rep>;
template<Representation Rep = double>
using l = units::isq::si::volume<units::isq::si::litre, Rep>;
template<Representation Rep = double>
using yl = units::isq::si::volume<units::isq::si::yoctolitre, Rep>;
template<Representation Rep = double>
using zl = units::isq::si::volume<units::isq::si::zeptolitre, Rep>;
template<Representation Rep = double>
using al = units::isq::si::volume<units::isq::si::attolitre, Rep>;
template<Representation Rep = double>
using fl = units::isq::si::volume<units::isq::si::femtolitre, Rep>;
template<Representation Rep = double>
using pl = units::isq::si::volume<units::isq::si::picolitre, Rep>;
template<Representation Rep = double>
using nl = units::isq::si::volume<units::isq::si::nanolitre, Rep>;
template<Representation Rep = double>
using ul = units::isq::si::volume<units::isq::si::microlitre, Rep>;
template<Representation Rep = double>
using ml = units::isq::si::volume<units::isq::si::millilitre, Rep>;
template<Representation Rep = double>
using cl = units::isq::si::volume<units::isq::si::centilitre, Rep>;
template<Representation Rep = double>
using dl = units::isq::si::volume<units::isq::si::decilitre, Rep>;
template<Representation Rep = double>
using dal = units::isq::si::volume<units::isq::si::decalitre, Rep>;
template<Representation Rep = double>
using hl = units::isq::si::volume<units::isq::si::hectolitre, Rep>;
template<Representation Rep = double>
using kl = units::isq::si::volume<units::isq::si::kilolitre, Rep>;
template<Representation Rep = double>
using Ml = units::isq::si::volume<units::isq::si::megalitre, Rep>;
template<Representation Rep = double>
using Gl = units::isq::si::volume<units::isq::si::gigalitre, Rep>;
template<Representation Rep = double>
using Tl = units::isq::si::volume<units::isq::si::teralitre, Rep>;
template<Representation Rep = double>
using Pl = units::isq::si::volume<units::isq::si::petalitre, Rep>;
template<Representation Rep = double>
using El = units::isq::si::volume<units::isq::si::exalitre, Rep>;
template<Representation Rep = double>
using Zl = units::isq::si::volume<units::isq::si::zettalitre, Rep>;
template<Representation Rep = double>
using Yl = units::isq::si::volume<units::isq::si::yottalitre, Rep>;
} // namespace units::aliases::isq::si::inline volume
#endif // UNITS_NO_ALIASES
#endif // UNITS_NO_ALIASES