util::quantities::electromagnetism_literals Namespace Reference

Literal constants for quantities. More...

Functions

constexpr coulomb operator""_C (long double v)
 Literal coulomb value. More...
 
constexpr coulomb operator""_C (unsigned long long int v)
 
constexpr millicoulomb operator""_mC (long double v)
 Literal millicoulomb value. More...
 
constexpr millicoulomb operator""_mC (unsigned long long int v)
 
constexpr microcoulomb operator""_uC (long double v)
 Literal microcoulomb value. More...
 
constexpr microcoulomb operator""_uC (unsigned long long int v)
 
constexpr nanocoulomb operator""_nC (long double v)
 Literal nanocoulomb value. More...
 
constexpr nanocoulomb operator""_nC (unsigned long long int v)
 
constexpr picocoulomb operator""_pC (long double v)
 Literal picocoulomb value. More...
 
constexpr picocoulomb operator""_pC (unsigned long long int v)
 
constexpr femtocoulomb operator""_fC (long double v)
 Literal femtocoulomb value. More...
 
constexpr femtocoulomb operator""_fC (unsigned long long int v)
 
constexpr volt operator""_V (long double v)
 Literal volt value. More...
 
constexpr volt operator""_V (unsigned long long int v)
 
constexpr millivolt operator""_mV (long double v)
 Literal millivolt value. More...
 
constexpr millivolt operator""_mV (unsigned long long int v)
 
constexpr microvolt operator""_uV (long double v)
 Literal microvolt value. More...
 
constexpr microvolt operator""_uV (unsigned long long int v)
 
constexpr kilovolt operator""_kV (long double v)
 Literal kilovolt value. More...
 
constexpr kilovolt operator""_kV (unsigned long long int v)
 
constexpr megavolt operator""_MV (long double v)
 Literal megavolt value. More...
 
constexpr megavolt operator""_MV (unsigned long long int v)
 
constexpr gigavolt operator""_GV (long double v)
 Literal gigavolt value. More...
 
constexpr gigavolt operator""_GV (unsigned long long int v)
 

Detailed Description

Literal constants for quantities.

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

// definition of `util::quantities::picocoulomb` constant:
constexpr auto Q_pC = 230_pC;
// assignment (likely to a quantity) of
// `util::quantities::femtocoulomb{500.0}`
Q = 500_fC;

Function Documentation

constexpr coulomb util::quantities::electromagnetism_literals::operator""_C ( long double  v)

Literal coulomb value.

Definition at line 244 of file electromagnetism.h.

245  { return coulomb{ static_cast<double>(v) }; }
coulomb_as<> coulomb
Type of charge stored in coulombs, in double precision.
constexpr coulomb util::quantities::electromagnetism_literals::operator""_C ( unsigned long long int  v)

Definition at line 246 of file electromagnetism.h.

247  { return coulomb{ static_cast<double>(v) }; }
coulomb_as<> coulomb
Type of charge stored in coulombs, in double precision.
constexpr femtocoulomb util::quantities::electromagnetism_literals::operator""_fC ( long double  v)

Literal femtocoulomb value.

Definition at line 284 of file electromagnetism.h.

285  { return femtocoulomb{ static_cast<double>(v) }; }
femtocoulomb_as<> femtocoulomb
Type of charge stored in femtocoulomb, in double precision.
constexpr femtocoulomb util::quantities::electromagnetism_literals::operator""_fC ( unsigned long long int  v)

Definition at line 286 of file electromagnetism.h.

287  { return femtocoulomb{ static_cast<double>(v) }; }
femtocoulomb_as<> femtocoulomb
Type of charge stored in femtocoulomb, in double precision.
constexpr gigavolt util::quantities::electromagnetism_literals::operator""_GV ( long double  v)

Literal gigavolt value.

Definition at line 333 of file electromagnetism.h.

334  { return gigavolt{ static_cast<double>(v) }; }
gigavolt_as<> gigavolt
Type of potential stored in gigavolt, in double precision.
constexpr gigavolt util::quantities::electromagnetism_literals::operator""_GV ( unsigned long long int  v)

Definition at line 335 of file electromagnetism.h.

336  { return gigavolt{ static_cast<double>(v) }; }
gigavolt_as<> gigavolt
Type of potential stored in gigavolt, in double precision.
constexpr kilovolt util::quantities::electromagnetism_literals::operator""_kV ( long double  v)

Literal kilovolt value.

Definition at line 317 of file electromagnetism.h.

318  { return kilovolt{ static_cast<double>(v) }; }
kilovolt_as<> kilovolt
Type of potential stored in kilovolt, in double precision.
constexpr kilovolt util::quantities::electromagnetism_literals::operator""_kV ( unsigned long long int  v)

Definition at line 319 of file electromagnetism.h.

320  { return kilovolt{ static_cast<double>(v) }; }
kilovolt_as<> kilovolt
Type of potential stored in kilovolt, in double precision.
constexpr millicoulomb util::quantities::electromagnetism_literals::operator""_mC ( long double  v)

Literal millicoulomb value.

Definition at line 252 of file electromagnetism.h.

253  { return millicoulomb{ static_cast<double>(v) }; }
millicoulomb_as<> millicoulomb
Type of charge stored in millicoulomb, in double precision.
constexpr millicoulomb util::quantities::electromagnetism_literals::operator""_mC ( unsigned long long int  v)

Definition at line 254 of file electromagnetism.h.

255  { return millicoulomb{ static_cast<double>(v) }; }
millicoulomb_as<> millicoulomb
Type of charge stored in millicoulomb, in double precision.
constexpr millivolt util::quantities::electromagnetism_literals::operator""_mV ( long double  v)

Literal millivolt value.

Definition at line 301 of file electromagnetism.h.

302  { return millivolt{ static_cast<double>(v) }; }
millivolt_as<> millivolt
Type of potential stored in millivolt, in double precision.
constexpr millivolt util::quantities::electromagnetism_literals::operator""_mV ( unsigned long long int  v)

Definition at line 303 of file electromagnetism.h.

304  { return millivolt{ static_cast<double>(v) }; }
millivolt_as<> millivolt
Type of potential stored in millivolt, in double precision.
constexpr megavolt util::quantities::electromagnetism_literals::operator""_MV ( long double  v)

Literal megavolt value.

Definition at line 325 of file electromagnetism.h.

326  { return megavolt{ static_cast<double>(v) }; }
megavolt_as<> megavolt
Type of potential stored in megavolt, in double precision.
constexpr megavolt util::quantities::electromagnetism_literals::operator""_MV ( unsigned long long int  v)

Definition at line 327 of file electromagnetism.h.

328  { return megavolt{ static_cast<double>(v) }; }
megavolt_as<> megavolt
Type of potential stored in megavolt, in double precision.
constexpr nanocoulomb util::quantities::electromagnetism_literals::operator""_nC ( long double  v)

Literal nanocoulomb value.

Definition at line 268 of file electromagnetism.h.

269  { return nanocoulomb{ static_cast<double>(v) }; }
nanocoulomb_as<> nanocoulomb
Type of charge stored in nanocoulomb, in double precision.
constexpr nanocoulomb util::quantities::electromagnetism_literals::operator""_nC ( unsigned long long int  v)

Definition at line 270 of file electromagnetism.h.

271  { return nanocoulomb{ static_cast<double>(v) }; }
nanocoulomb_as<> nanocoulomb
Type of charge stored in nanocoulomb, in double precision.
constexpr picocoulomb util::quantities::electromagnetism_literals::operator""_pC ( long double  v)

Literal picocoulomb value.

Definition at line 276 of file electromagnetism.h.

277  { return picocoulomb{ static_cast<double>(v) }; }
picocoulomb_as<> picocoulomb
Type of charge stored in picocoulomb, in double precision.
constexpr picocoulomb util::quantities::electromagnetism_literals::operator""_pC ( unsigned long long int  v)

Definition at line 278 of file electromagnetism.h.

279  { return picocoulomb{ static_cast<double>(v) }; }
picocoulomb_as<> picocoulomb
Type of charge stored in picocoulomb, in double precision.
constexpr microcoulomb util::quantities::electromagnetism_literals::operator""_uC ( long double  v)

Literal microcoulomb value.

Definition at line 260 of file electromagnetism.h.

261  { return microcoulomb{ static_cast<double>(v) }; }
microcoulomb_as<> microcoulomb
Type of charge stored in microcoulomb, in double precision.
constexpr microcoulomb util::quantities::electromagnetism_literals::operator""_uC ( unsigned long long int  v)

Definition at line 262 of file electromagnetism.h.

263  { return microcoulomb{ static_cast<double>(v) }; }
microcoulomb_as<> microcoulomb
Type of charge stored in microcoulomb, in double precision.
constexpr microvolt util::quantities::electromagnetism_literals::operator""_uV ( long double  v)

Literal microvolt value.

Definition at line 309 of file electromagnetism.h.

310  { return microvolt{ static_cast<double>(v) }; }
microvolt_as<> microvolt
Type of potential stored in microvolt, in double precision.
constexpr microvolt util::quantities::electromagnetism_literals::operator""_uV ( unsigned long long int  v)

Definition at line 311 of file electromagnetism.h.

312  { return microvolt{ static_cast<double>(v) }; }
microvolt_as<> microvolt
Type of potential stored in microvolt, in double precision.
constexpr volt util::quantities::electromagnetism_literals::operator""_V ( long double  v)

Literal volt value.

Definition at line 293 of file electromagnetism.h.

294  { return volt{ static_cast<double>(v) }; }
volt_as<> volt
Type of potential stored in volts, in double precision.
constexpr volt util::quantities::electromagnetism_literals::operator""_V ( unsigned long long int  v)

Definition at line 295 of file electromagnetism.h.

296  { return volt{ static_cast<double>(v) }; }
volt_as<> volt
Type of potential stored in volts, in double precision.