Skip to content

mp_units::representation_values

A type trait that defines zero, one, min, and max for a representation type

Synopsis

Declared in <mp-units/framework/customization_points.h>

template<typename Rep>
struct representation_values : std::chrono::duration_values<Rep>

Description

The zero, one, min, and max member functions in mp_units::quantity forward their work to these methods. This type can be specialized if the representation Rep requires a specific implementation to return these quantity objects.

The primary template provides zero() and one() only for a scalar type constructible from int. A vector or a tensor type specializes it to provide zero(), which is what a quantity of it, and zero, compare against.

Base Classes

NameDescription
std::chrono::duration_values<Rep>

Static Member Functions

Name
one
zero

Specializations

Template Parameters

NameDescription
Repa representation type for which a type trait is defined