LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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)
 Literal coulomb value. More...
 
constexpr millicoulomb operator""_mC (long double v)
 Literal millicoulomb value. More...
 
constexpr millicoulomb operator""_mC (unsigned long long int v)
 Literal millicoulomb value. More...
 
constexpr microcoulomb operator""_uC (long double v)
 Literal microcoulomb value. More...
 
constexpr microcoulomb operator""_uC (unsigned long long int v)
 Literal microcoulomb value. More...
 
constexpr nanocoulomb operator""_nC (long double v)
 Literal nanocoulomb value. More...
 
constexpr nanocoulomb operator""_nC (unsigned long long int v)
 Literal nanocoulomb value. More...
 
constexpr picocoulomb operator""_pC (long double v)
 Literal picocoulomb value. More...
 
constexpr picocoulomb operator""_pC (unsigned long long int v)
 Literal picocoulomb value. More...
 
constexpr femtocoulomb operator""_fC (long double v)
 Literal femtocoulomb value. More...
 
constexpr femtocoulomb operator""_fC (unsigned long long int v)
 Literal femtocoulomb value. More...
 
constexpr volt operator""_V (long double v)
 Literal volt value. More...
 
constexpr volt operator""_V (unsigned long long int v)
 Literal volt value. More...
 
constexpr millivolt operator""_mV (long double v)
 Literal millivolt value. More...
 
constexpr millivolt operator""_mV (unsigned long long int v)
 Literal millivolt value. More...
 
constexpr microvolt operator""_uV (long double v)
 Literal microvolt value. More...
 
constexpr microvolt operator""_uV (unsigned long long int v)
 Literal microvolt value. More...
 
constexpr kilovolt operator""_kV (long double v)
 Literal kilovolt value. More...
 
constexpr kilovolt operator""_kV (unsigned long long int v)
 Literal kilovolt value. More...
 
constexpr megavolt operator""_MV (long double v)
 Literal megavolt value. More...
 
constexpr megavolt operator""_MV (unsigned long long int v)
 Literal megavolt value. More...
 
constexpr gigavolt operator""_GV (long double v)
 Literal gigavolt value. More...
 
constexpr gigavolt operator""_GV (unsigned long long int v)
 Literal gigavolt value. More...
 

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 237 of file electromagnetism.h.

238  {
239  return coulomb{static_cast<double>(v)};
240  }
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)

Literal coulomb value.

Definition at line 241 of file electromagnetism.h.

242  {
243  return coulomb{static_cast<double>(v)};
244  }
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 297 of file electromagnetism.h.

298  {
299  return femtocoulomb{static_cast<double>(v)};
300  }
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)

Literal femtocoulomb value.

Definition at line 301 of file electromagnetism.h.

302  {
303  return femtocoulomb{static_cast<double>(v)};
304  }
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 369 of file electromagnetism.h.

370  {
371  return gigavolt{static_cast<double>(v)};
372  }
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)

Literal gigavolt value.

Definition at line 373 of file electromagnetism.h.

374  {
375  return gigavolt{static_cast<double>(v)};
376  }
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 345 of file electromagnetism.h.

346  {
347  return kilovolt{static_cast<double>(v)};
348  }
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)

Literal kilovolt value.

Definition at line 349 of file electromagnetism.h.

350  {
351  return kilovolt{static_cast<double>(v)};
352  }
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 249 of file electromagnetism.h.

250  {
251  return millicoulomb{static_cast<double>(v)};
252  }
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)

Literal millicoulomb value.

Definition at line 253 of file electromagnetism.h.

254  {
255  return millicoulomb{static_cast<double>(v)};
256  }
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 321 of file electromagnetism.h.

322  {
323  return millivolt{static_cast<double>(v)};
324  }
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)

Literal millivolt value.

Definition at line 325 of file electromagnetism.h.

326  {
327  return millivolt{static_cast<double>(v)};
328  }
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 357 of file electromagnetism.h.

358  {
359  return megavolt{static_cast<double>(v)};
360  }
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)

Literal megavolt value.

Definition at line 361 of file electromagnetism.h.

362  {
363  return megavolt{static_cast<double>(v)};
364  }
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 273 of file electromagnetism.h.

274  {
275  return nanocoulomb{static_cast<double>(v)};
276  }
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)

Literal nanocoulomb value.

Definition at line 277 of file electromagnetism.h.

278  {
279  return nanocoulomb{static_cast<double>(v)};
280  }
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 285 of file electromagnetism.h.

286  {
287  return picocoulomb{static_cast<double>(v)};
288  }
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)

Literal picocoulomb value.

Definition at line 289 of file electromagnetism.h.

290  {
291  return picocoulomb{static_cast<double>(v)};
292  }
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 261 of file electromagnetism.h.

262  {
263  return microcoulomb{static_cast<double>(v)};
264  }
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)

Literal microcoulomb value.

Definition at line 265 of file electromagnetism.h.

266  {
267  return microcoulomb{static_cast<double>(v)};
268  }
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 333 of file electromagnetism.h.

334  {
335  return microvolt{static_cast<double>(v)};
336  }
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)

Literal microvolt value.

Definition at line 337 of file electromagnetism.h.

338  {
339  return microvolt{static_cast<double>(v)};
340  }
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 309 of file electromagnetism.h.

310  {
311  return volt{static_cast<double>(v)};
312  }
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)

Literal volt value.

Definition at line 313 of file electromagnetism.h.

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