16 #ifndef OPENKALMAN_VALUE_TO_NUMBER_HPP 17 #define OPENKALMAN_VALUE_TO_NUMBER_HPP 32 template<
typename Arg>
39 else if constexpr (requires { {std::move(arg)()} ->
number; })
return std::move(arg)();
40 else return std::move(arg);
42 static_assert(value<Arg>);
45 return std::move(arg)();
46 else { static_assert(number<Arg>);
return std::move(arg); }
53 #endif //OPENKALMAN_VALUE_TO_NUMBER_HPP
constexpr bool number
T is a numerical type.
Definition: number.hpp:33
constexpr bool value
T is numerical value or is reducible to a numerical value.
Definition: value.hpp:31
constexpr auto to_number(Arg arg)
Convert any values::value to a values::number.
Definition: to_number.hpp:34
Definition: dynamic.hpp:31
Definition for values::abs.
Definition: constant_coefficient.hpp:25
Definition for values::number.