electro 0.3.0
Type-safe electrical units library modeled after std::chrono
Loading...
Searching...
No Matches
electro::quantity_suffix< Unit, Precision > Struct Template Reference

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

#include <electro/electro.hpp>

Static Public Member Functions

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

Detailed Description

template<typename Unit, typename Precision>
struct 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 1170 of file electro.hpp.

Member Function Documentation

◆ value()

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

Returns the display suffix.

Definition at line 1172 of file electro.hpp.

Referenced by electro::to_string().


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