16 #ifndef LARDATAALG_UTILITIES_QUANTITIES_SPACETIME_H 17 #define LARDATAALG_UTILITIES_QUANTITIES_SPACETIME_H 25 #include <string_view> 35 static constexpr
auto symbol =
"s"sv;
36 static constexpr
auto name =
"second"sv;
40 static constexpr
auto symbol =
"m"sv;
41 static constexpr
auto name =
"meter"sv;
67 template <
typename R,
typename T =
double>
74 template <
typename T =
double>
78 template <
typename T =
double>
91 template <
typename T =
double>
95 template <
typename T =
double>
108 template <
typename T =
double>
112 template <
typename T =
double>
125 template <
typename T =
double>
129 template <
typename T =
double>
142 template <
typename T =
double>
146 template <
typename T =
double>
172 namespace time_literals {
176 constexpr
second operator""_s(
long double v)
178 return second{
static_cast<double>(v)};
180 constexpr
second operator""_s(
unsigned long long int v)
182 return second{
static_cast<double>(v)};
238 namespace intervals {
241 template <
typename R,
typename T =
double>
248 template <
typename T =
double>
259 template <
typename T =
double>
270 template <
typename T =
double>
281 template <
typename T =
double>
292 template <
typename T =
double>
307 template <
typename R,
typename T =
double,
typename Cat = NoCategory>
314 template <
typename T =
double,
typename Cat = NoCategory>
325 template <
typename T =
double,
typename Cat = NoCategory>
336 template <
typename T =
double,
typename Cat = NoCategory>
347 template <
typename T =
double,
typename Cat = NoCategory>
358 template <
typename T =
double,
typename Cat = NoCategory>
392 template <
typename R,
typename T =
double>
399 template <
typename T =
double>
403 template <
typename T =
double>
416 template <
typename T =
double>
420 template <
typename T =
double>
433 template <
typename T =
double>
437 template <
typename T =
double>
450 template <
typename T =
double>
454 template <
typename T =
double>
467 template <
typename T =
double>
471 template <
typename T =
double>
484 template <
typename T =
double>
488 template <
typename T =
double>
501 template <
typename T =
double>
505 template <
typename T =
double>
518 template <
typename T =
double>
522 template <
typename T =
double>
550 namespace space_literals {
554 constexpr
meter operator""_m(
long double v)
556 return meter{
static_cast<double>(v)};
558 constexpr
meter operator""_m(
unsigned long long int v)
560 return meter{
static_cast<double>(v)};
568 return kilometer{
static_cast<double>(v)};
570 constexpr
kilometer operator""_km(
unsigned long long int v)
572 return kilometer{
static_cast<double>(v)};
616 return nanometer{
static_cast<double>(v)};
618 constexpr
nanometer operator""_nm(
unsigned long long int v)
620 return nanometer{
static_cast<double>(v)};
628 return picometer{
static_cast<double>(v)};
630 constexpr
picometer operator""_pm(
unsigned long long int v)
632 return picometer{
static_cast<double>(v)};
652 namespace intervals {
655 template <
typename R,
typename T =
double>
662 template <
typename T =
double>
673 template <
typename T =
double>
684 template <
typename T =
double>
695 template <
typename T =
double>
706 template <
typename T =
double>
717 template <
typename T =
double>
728 template <
typename T =
double>
739 template <
typename T =
double>
754 template <
typename R,
typename T =
double,
typename Cat = NoCategory>
761 template <
typename T =
double,
typename Cat = NoCategory>
772 template <
typename T =
double,
typename Cat = NoCategory>
783 template <
typename T =
double,
typename Cat = NoCategory>
794 template <
typename T =
double,
typename Cat = NoCategory>
805 template <
typename T =
double,
typename Cat = NoCategory>
816 template <
typename T =
double,
typename Cat = NoCategory>
827 template <
typename T =
double,
typename Cat = NoCategory>
838 template <
typename T =
double,
typename Cat = NoCategory>
855 #endif // LARDATAALG_UTILITIES_QUANTITIES_SPACETIME_H picosecond_as<> picosecond
Type of time stored in picoseconds, in double precision.
microsecond_as<> microsecond
Type of time stored in microseconds, in double precision.
millimeter_as<> millimeter
Type of space stored in millimeters, in double precision.
kilometer_as<> kilometer
Type of space stored in kilometers, in double precision.
millisecond_as<> millisecond
Type of time stored in milliseconds, in double precision.
femtometer_as<> femtometer
Type of space stored in femtometers, in double precision.
Defines point and interval variables based on quantities.
A value measured in the specified unit.
An interval (duration, length, distance) between two quantity points.
meter_as<> meter
Type of space stored in meters, in double precision.
Numeric variable proxies with embedded unit of measurement.
nanosecond_as<> nanosecond
Type of time stored in nanoseconds, in double precision.
picometer_as<> picometer
Type of space stored in picometers, in double precision.
micrometer_as<> micrometer
Type of space stored in micrometers, in double precision.
Types of variables with a unit.
second_as<> second
Type of time stored in seconds, in double precision.
nanometer_as<> nanometer
Type of space stored in nanometers, in double precision.
centimeter_as<> centimeter
Type of space stored in centimeters, in double precision.