16 #ifndef OPENKALMAN_NUMBER_TRAITS_HPP 17 #define OPENKALMAN_NUMBER_TRAITS_HPP 34 template<
typename T,
typename =
void>
51 #ifdef DOXYGEN_SHOULD_SKIP_THIS 55 static constexpr
auto real = [](T t) {
return std::real(std::move(t)); };
61 static constexpr
auto imag = [](T t) {
return std::imag(std::move(t)); };
69 static constexpr
auto make_complex = [](
auto re,
auto im) {
return std::complex<T> {std::move(re), std::move(im)}; };
79 template<
typename T> requires std::is_arithmetic_v<T>
88 static constexpr
auto real = [](T t) {
return std::real(std::move(t)); };
89 static constexpr
auto imag = [](T t) {
return std::imag(std::move(t)); };
90 static constexpr
auto make_complex = [](T re, T im) {
return std::complex<T> {std::move(re), std::move(im)}; };
102 static constexpr
auto real = [](std::complex<T> t) {
return std::real(std::move(t)); };
103 static constexpr
auto imag = [](std::complex<T> t) {
return std::imag(std::move(t)); };
104 static constexpr
auto make_complex = [](T re, T im) {
return std::complex<T> {std::move(re), std::move(im)}; };
Definition: basics.hpp:41
constexpr bool complex
T is a value that reduces to std::complex or a custom complex type.
Definition: complex.hpp:47
static constexpr bool is_specialized
This value is true for all T for which there exists a specialization of numeric_traits.
Definition: number_traits.hpp:42
constexpr auto imag(const Arg &arg)
A constexpr function to obtain the imaginary part of a (complex) number.
Definition: imag.hpp:40
constexpr auto real(const Arg &arg)
A constexpr function to obtain the real part of a (complex) number.
Definition: real.hpp:40
Basic definitions for OpenKalman as a whole.
static constexpr bool is_complex
Whether T is a complex number.
Definition: number_traits.hpp:48
Definition: number_traits.hpp:36