Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::math Namespace Reference

Function Documentation

◆ ARENE_CPP14_INLINE_VARIABLE() [1/3]

arene::base::math::ARENE_CPP14_INLINE_VARIABLE ( abs_detail::abs_impl ,
abs  )

Obtain the absolute value using a member function, an ADL overload, or arene::base::abs.

◆ ARENE_CPP14_INLINE_VARIABLE() [2/3]

arene::base::math::ARENE_CPP14_INLINE_VARIABLE ( complex_decomp_detail::imag_impl ,
imag  )

Extract the imaginary part of a value, returning zero when no imag function exists.

◆ ARENE_CPP14_INLINE_VARIABLE() [3/3]

arene::base::math::ARENE_CPP14_INLINE_VARIABLE ( complex_decomp_detail::real_impl ,
real  )

Extract the real part of a value, treating the whole value as real when no real function exists.

Variable Documentation

◆ is_complex_v

template<typename T>
bool arene::base::math::is_complex_v {complex_decomp_detail::is_member_complex_v<T> || complex_decomp_detail::is_adl_complex_v<T>}
constexpr

Determine if a type models a complex number or not.

Template Parameters
TThe type to check

Equal to true if either T has member functions real and imag or there are free functions real(T) and imag(T) which can be found by argument-dependent lookup. Otherwise equal to false.