Skip to content

mp_units::utility::uncertain::uncertain

Converts an exact value to an uncertain one (value ± 0)

Synopsis

Declared in <mp-units/utility/uncertain.h>

[[nodiscard]] constexpr explicit(false) uncertain(value_type val);

Description

Intentionally implicit - an exact value is losslessly representable as an uncertain value with a zero uncertainty, which lets exact quantities join uncertainty propagation in mixed-representation arithmetic.

Return Value

Note

The return value should not be discarded.

Parameters

NameDescription
valThe object to construct from