#ifndef SPROUT_MATH_FLOAT_PROMOTE_HPP #define SPROUT_MATH_FLOAT_PROMOTE_HPP #include #include namespace sprout { namespace math { namespace detail { template struct float_promote_impl {}; template struct float_promote_impl : public std::conditional< (std::is_same::value || std::is_same::value), long double, double > {}; template struct float_promote_impl : public sprout::math::detail::float_promote_impl< std::is_arithmetic::value, typename std::conditional< (std::is_same::value || std::is_same::value), long double, double >::type, Tail... > {}; template struct float_promote : public sprout::math::detail::float_promote_impl< std::is_arithmetic::value, double, Head, Tail... > {}; } // namespace detail // // float_promote // template struct float_promote : public sprout::math::detail::float_promote< typename std::remove_cv::type... > {}; } // namespace math } // namespace sprout #endif // #ifndef SPROUT_MATH_FLOAT_PROMOTE_HPP