Skip to content

mp_units::sqrt

sqrt overloads

Synopses

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

[[nodiscard]] consteval Dimension auto sqrt(auto d);

» more...

[[nodiscard]] consteval Dimension auto sqrt(auto d);

» more...

[[nodiscard]] consteval Dimension auto sqrt(auto d);

» more...

Computes the square root of a reference

template<std::same_as<reference> R>
[[nodiscard]] consteval /* implementation-defined */ sqrt(R);

» more...

Computes the square root of a quantity

template<auto R, typename Rep>
  requires requires(Rep v) { sqrt(v); }
#if MP_UNITS_HOSTED
           || requires(Rep v) { std::sqrt(v); }
#endif
[[nodiscard]] constexpr quantity<sqrt(R), Rep> sqrt(quantity<R, Rep> const& q) noexcept;

» more...

Return Value

Quantity The result of computation

Note

The return value should not be discarded.

Parameters

NameDescription
qQuantity being the base of the operation