mp_units::default_point_origin

Returns the default point origin for a reference

Synopsis

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

template<Reference R>
[[nodiscard]]
consteval
PointOriginFor<get_quantity_spec(R{})> auto
default_point_origin(R r);

Description

If the reference's unit defines its own point origin, that origin is returned. Otherwise, the natural point origin of the reference's quantity specification is used.

Return Value

the default point origin associated with R

NOTE

The return value should not be discarded.

Template Parameters

NameDescription
Rreference type for which the default point origin is requested

Parameters

NameDescription
rreference instance for which the default point origin is requested