prom 0.1.0
Client-independent C++23 Prometheus/OpenMetrics metric abstraction
Loading...
Searching...
No Matches
prom::DimensionalValue Concept Reference

Satisfied by a dimval-like value: it exposes a value_t, reports its magnitude through numeric_as_double(), and carries unit metadata through either unit_descriptor() (measures) or descriptor() (units). More...

#include <dimval.hpp>

Concept definition

template<class V>
!std::is_arithmetic_v<std::remove_cvref_t<V>> &&
requires(const std::remove_cvref_t<V>& value) {
typename std::remove_cvref_t<V>::value_t;
{ value.numeric_as_double() } -> std::convertible_to<double>;
} &&
(requires(const std::remove_cvref_t<V>& value) { value.unit_descriptor(); } ||
requires(const std::remove_cvref_t<V>& value) { value.descriptor(); })
Satisfied by a dimval-like value: it exposes a value_t, reports its magnitude through numeric_as_doub...
Definition dimval.hpp:25

Detailed Description

Satisfied by a dimval-like value: it exposes a value_t, reports its magnitude through numeric_as_double(), and carries unit metadata through either unit_descriptor() (measures) or descriptor() (units).

Arithmetic types are excluded so the arithmetic normalize() overload wins for them.