tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
abs.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  etl
 
namespace  etl::chrono
 

Functions

template<typename R, typename P>
requires (numeric_limits<R>::is_signed)
constexpr auto abs (duration< R, P > d) noexcept(is_arithmetic_v< R >) -> duration< R, P >
 Returns the absolute value of the duration d. Specifically, if d >= d.zero(), return d, otherwise return -d. The function does not participate in the overload resolution unless etl::numeric_limits<R>::is_signed is true.