All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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)
 
constexpr kilometer operator""_km (long double v)
 Literal kilometer value. More...
 
constexpr kilometer operator""_km (unsigned long long int v)
 
constexpr centimeter operator""_cm (long double v)
 Literal centimeter value. More...
 
constexpr centimeter operator""_cm (unsigned long long int v)
 
constexpr millimeter operator""_mm (long double v)
 Literal millimeter value. More...
 
constexpr millimeter operator""_mm (unsigned long long int v)
 
constexpr micrometer operator""_um (long double v)
 Literal micrometer value. More...
 
constexpr micrometer operator""_um (unsigned long long int v)
 
constexpr nanometer operator""_nm (long double v)
 Literal nanometer value. More...
 
constexpr nanometer operator""_nm (unsigned long long int v)
 
constexpr picometer operator""_pm (long double v)
 Literal picometer value. More...
 
constexpr picometer operator""_pm (unsigned long long int v)
 
constexpr femtometer operator""_fm (long double v)
 Literal femtometer value. More...
 
constexpr femtometer operator""_fm (unsigned long long int v)
 

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:

using namespace util::quantities::space_literals;
// 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 563 of file spacetime.h.

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

Definition at line 565 of file spacetime.h.

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

Literal femtometer value.

Definition at line 603 of file spacetime.h.

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

Definition at line 605 of file spacetime.h.

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

Literal kilometer value.

Definition at line 555 of file spacetime.h.

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

Definition at line 557 of file spacetime.h.

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

Literal meter value.

Definition at line 547 of file spacetime.h.

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

Definition at line 549 of file spacetime.h.

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

Literal millimeter value.

Definition at line 571 of file spacetime.h.

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

Definition at line 573 of file spacetime.h.

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

Literal nanometer value.

Definition at line 587 of file spacetime.h.

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

Definition at line 589 of file spacetime.h.

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

Literal picometer value.

Definition at line 595 of file spacetime.h.

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

Definition at line 597 of file spacetime.h.

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

Literal micrometer value.

Definition at line 579 of file spacetime.h.

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

Definition at line 581 of file spacetime.h.

582  { return micrometer{ static_cast<double>(v) }; }
micrometer_as<> micrometer
Type of space stored in micrometers, in double precision.
Definition: spacetime.h:468