util::quantities::energy_literals Namespace Reference

Literal constants for energy quantities. More...

Functions

constexpr electronvolt operator""_eV (long double v)
 Literal electronvolt value. More...
 
constexpr electronvolt operator""_eV (unsigned long long int v)
 
constexpr microelectronvolt operator""_ueV (long double v)
 Literal microelectronvolt value. More...
 
constexpr microelectronvolt operator""_ueV (unsigned long long int v)
 
constexpr millielectronvolt operator""_meV (long double v)
 Literal millielectronvolt value. More...
 
constexpr millielectronvolt operator""_meV (unsigned long long int v)
 
constexpr kiloelectronvolt operator""_keV (long double v)
 Literal kilovolt value. More...
 
constexpr kiloelectronvolt operator""_keV (unsigned long long int v)
 
constexpr megaelectronvolt operator""_MeV (long double v)
 Literal megaelectronvolt value. More...
 
constexpr megaelectronvolt operator""_MeV (unsigned long long int v)
 
constexpr gigaelectronvolt operator""_GeV (long double v)
 Literal gigaelectronvolt value. More...
 
constexpr gigaelectronvolt operator""_GeV (unsigned long long int v)
 
constexpr teraelectronvolt operator""_TeV (long double v)
 Literal teraelectronvolt value. More...
 
constexpr teraelectronvolt operator""_TeV (unsigned long long int v)
 

Detailed Description

Literal constants for energy quantities.

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

// definition of `util::quantities::megaelectronvolt` constant:
constexpr auto muon_MeV = 105.6583745_MeV;
// assignment (likely to a quantity) of
// `util::quantities::gigaelectronvolt{1.5}`
E = 1.5_GeV;

Function Documentation

constexpr electronvolt util::quantities::energy_literals::operator""_eV ( long double  v)

Literal electronvolt value.

Definition at line 166 of file energy.h.

167  { return electronvolt{ static_cast<double>(v) }; }
electronvolt_as<> electronvolt
Type of energy stored in electronvolts, in double precision.
Definition: energy.h:77
constexpr electronvolt util::quantities::energy_literals::operator""_eV ( unsigned long long int  v)

Definition at line 168 of file energy.h.

169  { return electronvolt{ static_cast<double>(v) }; }
electronvolt_as<> electronvolt
Type of energy stored in electronvolts, in double precision.
Definition: energy.h:77
constexpr gigaelectronvolt util::quantities::energy_literals::operator""_GeV ( long double  v)

Literal gigaelectronvolt value.

Definition at line 206 of file energy.h.

207  { return gigaelectronvolt{ static_cast<double>(v) }; }
gigaelectronvolt_as<> gigaelectronvolt
Type of energy stored in gigaelectronvolt, in double precision.
Definition: energy.h:129
constexpr gigaelectronvolt util::quantities::energy_literals::operator""_GeV ( unsigned long long int  v)

Definition at line 208 of file energy.h.

209  { return gigaelectronvolt{ static_cast<double>(v) }; }
gigaelectronvolt_as<> gigaelectronvolt
Type of energy stored in gigaelectronvolt, in double precision.
Definition: energy.h:129
constexpr kiloelectronvolt util::quantities::energy_literals::operator""_keV ( long double  v)

Literal kilovolt value.

Definition at line 190 of file energy.h.

191  { return kiloelectronvolt{ static_cast<double>(v) }; }
kiloelectronvolt_as<> kiloelectronvolt
Type of energy stored in kiloelectronvolt, in double precision.
Definition: energy.h:109
constexpr kiloelectronvolt util::quantities::energy_literals::operator""_keV ( unsigned long long int  v)

Definition at line 192 of file energy.h.

193  { return kiloelectronvolt{ static_cast<double>(v) }; }
kiloelectronvolt_as<> kiloelectronvolt
Type of energy stored in kiloelectronvolt, in double precision.
Definition: energy.h:109
constexpr millielectronvolt util::quantities::energy_literals::operator""_meV ( long double  v)

Literal millielectronvolt value.

Definition at line 182 of file energy.h.

183  { return millielectronvolt{ static_cast<double>(v) }; }
millielectronvolt_as<> millielectronvolt
Type of energy stored in millielectronvolt, in double precision.
Definition: energy.h:99
constexpr millielectronvolt util::quantities::energy_literals::operator""_meV ( unsigned long long int  v)

Definition at line 184 of file energy.h.

185  { return millielectronvolt{ static_cast<double>(v) }; }
millielectronvolt_as<> millielectronvolt
Type of energy stored in millielectronvolt, in double precision.
Definition: energy.h:99
constexpr megaelectronvolt util::quantities::energy_literals::operator""_MeV ( long double  v)

Literal megaelectronvolt value.

Definition at line 198 of file energy.h.

199  { return megaelectronvolt{ static_cast<double>(v) }; }
megaelectronvolt_as<> megaelectronvolt
Type of energy stored in megaelectronvolt, in double precision.
Definition: energy.h:119
constexpr megaelectronvolt util::quantities::energy_literals::operator""_MeV ( unsigned long long int  v)

Definition at line 200 of file energy.h.

201  { return megaelectronvolt{ static_cast<double>(v) }; }
megaelectronvolt_as<> megaelectronvolt
Type of energy stored in megaelectronvolt, in double precision.
Definition: energy.h:119
constexpr teraelectronvolt util::quantities::energy_literals::operator""_TeV ( long double  v)

Literal teraelectronvolt value.

Definition at line 214 of file energy.h.

215  { return teraelectronvolt{ static_cast<double>(v) }; }
teraelectronvolt_as<> teraelectronvolt
Type of energy stored in teraelectronvolt, in double precision.
Definition: energy.h:139
constexpr teraelectronvolt util::quantities::energy_literals::operator""_TeV ( unsigned long long int  v)

Definition at line 216 of file energy.h.

217  { return teraelectronvolt{ static_cast<double>(v) }; }
teraelectronvolt_as<> teraelectronvolt
Type of energy stored in teraelectronvolt, in double precision.
Definition: energy.h:139
constexpr microelectronvolt util::quantities::energy_literals::operator""_ueV ( long double  v)

Literal microelectronvolt value.

Definition at line 174 of file energy.h.

175  { return microelectronvolt{ static_cast<double>(v) }; }
microelectronvolt_as<> microelectronvolt
Type of energy stored in microelectronvolt, in double precision.
Definition: energy.h:88
constexpr microelectronvolt util::quantities::energy_literals::operator""_ueV ( unsigned long long int  v)

Definition at line 176 of file energy.h.

177  { return microelectronvolt{ static_cast<double>(v) }; }
microelectronvolt_as<> microelectronvolt
Type of energy stored in microelectronvolt, in double precision.
Definition: energy.h:88