quanta 0.1.0
Type-safe units for temperature, frequency, electrical and spatial quantities, modeled after std::chrono
Loading...
Searching...
No Matches
quanta::electro::quantity_suffix< Unit, Precision > Struct Template Reference

Trait giving the display suffix for a (unit, precision) pair. More...

#include <quanta/electro.hpp>

Static Public Member Functions

static std::string value ()
 Returns the display suffix.
 

Detailed Description

template<typename Unit, typename Precision>
struct quanta::electro::quantity_suffix< Unit, Precision >

Trait giving the display suffix for a (unit, precision) pair.

The primary template combines an SI prefix with the unit symbol (e.g. "mV", "kΩ") and is only usable when the precision is a standard SI prefix. Full specializations provide conventional suffixes for non-decade precisions such as "mAh", "Ah", "Wh" and "kWh".

Template Parameters
UnitThe unit tag type.
PrecisionThe (reduced) precision ratio.

Definition at line 1087 of file electro.hpp.

Member Function Documentation

◆ value()

template<typename Unit , typename Precision >
static std::string quanta::electro::quantity_suffix< Unit, Precision >::value ( )
inlinestatic

Returns the display suffix.

Definition at line 1089 of file electro.hpp.

Referenced by quanta::electro::to_string().


The documentation for this struct was generated from the following file: