Constructs a quantity directly from a numerical value, without an explicit reference.

Synopsis

Declared in <mp‐units/framework/quantity.h>

[[nodiscard]]
constexpr
explicit(!mp_units::implicitly_convertible(quantity_spec, dimensionless))
quantity(rep val)
requires detail::ExplicitFromNumber<reference>;

Return Value

Note

The return value should not be discarded.

Parameters

Name

Description

val

the numerical value to store

Created with MrDocs