piranha  0.10
Public Member Functions | List of all members
piranha::math::abs_impl< T, detail::abs_arith_enabler< T > > Struct Template Reference

Specialisation of the piranha::math::abs() functor for signed and unsigned integer types, and floating-point types. More...

#include <piranha/math.hpp>

Public Member Functions

auto operator() (const T &x) const -> decltype(impl(x))
 Call operator. More...
 

Detailed Description

template<typename T>
struct piranha::math::abs_impl< T, detail::abs_arith_enabler< T > >

Specialisation of the piranha::math::abs() functor for signed and unsigned integer types, and floating-point types.

This specialisation is activated when T is a signed or unsigned integer type, or a floating-point type. The result will be computed via std::abs() for floating-point and signed integer types, while for unsigned integer types it will be the input value unchanged.

Definition at line 970 of file math.hpp.

Member Function Documentation

◆ operator()()

template<typename T >
auto piranha::math::abs_impl< T, detail::abs_arith_enabler< T > >::operator() ( const T &  x) const -> decltype(impl(x))
inline

Call operator.

Parameters
xinput parameter.
Returns
absolute value of x.

Definition at line 1001 of file math.hpp.


The documentation for this struct was generated from the following file: