LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::quantities::space_literals Namespace Reference

Literal constants for space quantities. More...

Functions

constexpr meter operator""_m (long double v)
 Literal meter value. More...
 
constexpr meter operator""_m (unsigned long long int v)
 Literal meter value. More...
 
constexpr kilometer operator""_km (long double v)
 Literal kilometer value. More...
 
constexpr kilometer operator""_km (unsigned long long int v)
 Literal kilometer value. More...
 
constexpr centimeter operator""_cm (long double v)
 Literal centimeter value. More...
 
constexpr centimeter operator""_cm (unsigned long long int v)
 Literal centimeter value. More...
 
constexpr millimeter operator""_mm (long double v)
 Literal millimeter value. More...
 
constexpr millimeter operator""_mm (unsigned long long int v)
 Literal millimeter value. More...
 
constexpr micrometer operator""_um (long double v)
 Literal micrometer value. More...
 
constexpr micrometer operator""_um (unsigned long long int v)
 Literal micrometer value. More...
 
constexpr nanometer operator""_nm (long double v)
 Literal nanometer value. More...
 
constexpr nanometer operator""_nm (unsigned long long int v)
 Literal nanometer value. More...
 
constexpr picometer operator""_pm (long double v)
 Literal picometer value. More...
 
constexpr picometer operator""_pm (unsigned long long int v)
 Literal picometer value. More...
 
constexpr femtometer operator""_fm (long double v)
 Literal femtometer value. More...
 
constexpr femtometer operator""_fm (unsigned long long int v)
 Literal femtometer value. More...
 

Detailed Description

Literal constants for space quantities.

These functions allow a simplified syntax for specifying a space quantity. In order to use these, their namespace must be used:

// definition of `util::quantities::meter` constant:
constexpr auto d_m = 12_m;
[...]
// assignment (likely to a quantity) of
// `util::quantities::centimeter{500.0}`
d_m = 500_cm;

Function Documentation

constexpr centimeter util::quantities::space_literals::operator""_cm ( long double  v)

Literal centimeter value.

Definition at line 578 of file spacetime.h.

579  {
580  return centimeter{static_cast<double>(v)};
581  }
centimeter_as<> centimeter
Type of space point stored in centimeters, in double precision.
Definition: spacetime.h:787
constexpr centimeter util::quantities::space_literals::operator""_cm ( unsigned long long int  v)

Literal centimeter value.

Definition at line 582 of file spacetime.h.

583  {
584  return centimeter{static_cast<double>(v)};
585  }
centimeter_as<> centimeter
Type of space point stored in centimeters, in double precision.
Definition: spacetime.h:787
constexpr femtometer util::quantities::space_literals::operator""_fm ( long double  v)

Literal femtometer value.

Definition at line 638 of file spacetime.h.

639  {
640  return femtometer{static_cast<double>(v)};
641  }
femtometer_as<> femtometer
Type of space point stored in femtometers, in double precision.
Definition: spacetime.h:842
constexpr femtometer util::quantities::space_literals::operator""_fm ( unsigned long long int  v)

Literal femtometer value.

Definition at line 642 of file spacetime.h.

643  {
644  return femtometer{static_cast<double>(v)};
645  }
femtometer_as<> femtometer
Type of space point stored in femtometers, in double precision.
Definition: spacetime.h:842
constexpr kilometer util::quantities::space_literals::operator""_km ( long double  v)

Literal kilometer value.

Definition at line 566 of file spacetime.h.

567  {
568  return kilometer{static_cast<double>(v)};
569  }
kilometer_as<> kilometer
Type of space point stored in kilometers, in double precision.
Definition: spacetime.h:776
constexpr kilometer util::quantities::space_literals::operator""_km ( unsigned long long int  v)

Literal kilometer value.

Definition at line 570 of file spacetime.h.

571  {
572  return kilometer{static_cast<double>(v)};
573  }
kilometer_as<> kilometer
Type of space point stored in kilometers, in double precision.
Definition: spacetime.h:776
constexpr meter util::quantities::space_literals::operator""_m ( long double  v)

Literal meter value.

Definition at line 554 of file spacetime.h.

555  {
556  return meter{static_cast<double>(v)};
557  }
meter_as<> meter
Type of space point stored in meters, in double precision.
Definition: spacetime.h:765
constexpr meter util::quantities::space_literals::operator""_m ( unsigned long long int  v)

Literal meter value.

Definition at line 558 of file spacetime.h.

559  {
560  return meter{static_cast<double>(v)};
561  }
meter_as<> meter
Type of space point stored in meters, in double precision.
Definition: spacetime.h:765
constexpr millimeter util::quantities::space_literals::operator""_mm ( long double  v)

Literal millimeter value.

Definition at line 590 of file spacetime.h.

591  {
592  return millimeter{static_cast<double>(v)};
593  }
millimeter_as<> millimeter
Type of space point stored in millimeters, in double precision.
Definition: spacetime.h:798
constexpr millimeter util::quantities::space_literals::operator""_mm ( unsigned long long int  v)

Literal millimeter value.

Definition at line 594 of file spacetime.h.

595  {
596  return millimeter{static_cast<double>(v)};
597  }
millimeter_as<> millimeter
Type of space point stored in millimeters, in double precision.
Definition: spacetime.h:798
constexpr nanometer util::quantities::space_literals::operator""_nm ( long double  v)

Literal nanometer value.

Definition at line 614 of file spacetime.h.

615  {
616  return nanometer{static_cast<double>(v)};
617  }
nanometer_as<> nanometer
Type of space point stored in nanometers, in double precision.
Definition: spacetime.h:820
constexpr nanometer util::quantities::space_literals::operator""_nm ( unsigned long long int  v)

Literal nanometer value.

Definition at line 618 of file spacetime.h.

619  {
620  return nanometer{static_cast<double>(v)};
621  }
nanometer_as<> nanometer
Type of space point stored in nanometers, in double precision.
Definition: spacetime.h:820
constexpr picometer util::quantities::space_literals::operator""_pm ( long double  v)

Literal picometer value.

Definition at line 626 of file spacetime.h.

627  {
628  return picometer{static_cast<double>(v)};
629  }
picometer_as<> picometer
Type of space point stored in picometers, in double precision.
Definition: spacetime.h:831
constexpr picometer util::quantities::space_literals::operator""_pm ( unsigned long long int  v)

Literal picometer value.

Definition at line 630 of file spacetime.h.

631  {
632  return picometer{static_cast<double>(v)};
633  }
picometer_as<> picometer
Type of space point stored in picometers, in double precision.
Definition: spacetime.h:831
constexpr micrometer util::quantities::space_literals::operator""_um ( long double  v)

Literal micrometer value.

Definition at line 602 of file spacetime.h.

603  {
604  return micrometer{static_cast<double>(v)};
605  }
micrometer_as<> micrometer
Type of space point stored in micrometers, in double precision.
Definition: spacetime.h:809
constexpr micrometer util::quantities::space_literals::operator""_um ( unsigned long long int  v)

Literal micrometer value.

Definition at line 606 of file spacetime.h.

607  {
608  return micrometer{static_cast<double>(v)};
609  }
micrometer_as<> micrometer
Type of space point stored in micrometers, in double precision.
Definition: spacetime.h:809