util::quantities::frequency_literals Namespace Reference

Literal constants for frequency quantities. More...

Functions

constexpr hertz operator""_Hz (long double v)
 Literal hertz value. More...
 
constexpr hertz operator""_Hz (unsigned long long int v)
 
constexpr kilohertz operator""_kHz (long double v)
 Literal kilohertz value. More...
 
constexpr kilohertz operator""_kHz (unsigned long long int v)
 
constexpr megahertz operator""_MHz (long double v)
 Literal megahertz value. More...
 
constexpr megahertz operator""_MHz (unsigned long long int v)
 
constexpr gigahertz operator""_GHz (long double v)
 Literal gigahertz value. More...
 
constexpr gigahertz operator""_GHz (unsigned long long int v)
 

Detailed Description

Literal constants for frequency quantities.

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

// definition of `util::quantities::hertz` constant:
constexpr auto f_Hz = 12_Hz;
// assignment (likely to a quantity) of `util::quantities::megahertz{50.0}`
f_Hz = 50_MHz;

Function Documentation

constexpr gigahertz util::quantities::frequency_literals::operator""_GHz ( long double  v)

Literal gigahertz value.

Definition at line 158 of file frequency.h.

159  { return gigahertz{ static_cast<double>(v) }; }
gigahertz_as<> gigahertz
Type of frequency stored in gigahertz, in double precision.
Definition: frequency.h:111
constexpr gigahertz util::quantities::frequency_literals::operator""_GHz ( unsigned long long int  v)

Definition at line 160 of file frequency.h.

161  { return gigahertz{ static_cast<double>(v) }; }
gigahertz_as<> gigahertz
Type of frequency stored in gigahertz, in double precision.
Definition: frequency.h:111
constexpr hertz util::quantities::frequency_literals::operator""_Hz ( long double  v)

Literal hertz value.

Definition at line 134 of file frequency.h.

135  { return hertz{ static_cast<double>(v) }; }
hertz_as<> hertz
Type of frequency stored in hertz, in double precision.
Definition: frequency.h:81
constexpr hertz util::quantities::frequency_literals::operator""_Hz ( unsigned long long int  v)

Definition at line 136 of file frequency.h.

137  { return hertz{ static_cast<double>(v) }; }
hertz_as<> hertz
Type of frequency stored in hertz, in double precision.
Definition: frequency.h:81
constexpr kilohertz util::quantities::frequency_literals::operator""_kHz ( long double  v)

Literal kilohertz value.

Definition at line 142 of file frequency.h.

143  { return kilohertz{ static_cast<double>(v) }; }
kilohertz_as<> kilohertz
Type of frequency stored in kilohertz, in double precision.
Definition: frequency.h:91
constexpr kilohertz util::quantities::frequency_literals::operator""_kHz ( unsigned long long int  v)

Definition at line 144 of file frequency.h.

145  { return kilohertz{ static_cast<double>(v) }; }
kilohertz_as<> kilohertz
Type of frequency stored in kilohertz, in double precision.
Definition: frequency.h:91
constexpr megahertz util::quantities::frequency_literals::operator""_MHz ( long double  v)

Literal megahertz value.

Definition at line 150 of file frequency.h.

151  { return megahertz{ static_cast<double>(v) }; }
megahertz_as<> megahertz
Type of frequency stored in megahertz, in double precision.
Definition: frequency.h:101
constexpr megahertz util::quantities::frequency_literals::operator""_MHz ( unsigned long long int  v)

Definition at line 152 of file frequency.h.

153  { return megahertz{ static_cast<double>(v) }; }
megahertz_as<> megahertz
Type of frequency stored in megahertz, in double precision.
Definition: frequency.h:101