Skip to content

mp_units::utility::operator+

Unary plus operator

Synopsis

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

[[nodiscard]] constexpr constrained<decltype(+std::declval<T>()), ErrorPolicy> operator+(constrained const& x);

Note

This function is a hidden friend of constrained, declared only inside that class: it can be found only through argument-dependent lookup.

Return Value

A transparent wrapper that carries an error policy for domain constraint enforcement.

Note

The return value should not be discarded.

Parameters

NameDescription
xThe operand