Meta-function to select, of two types, the most accurate type for calculations. More...
#include <select_most_precise.hpp>
Public Types | |
typedef boost::mpl::if_c < one_not_fundamental, typename detail::select_most_precise::select_non_fundamental < boost::is_fundamental< T1 > ::type::value, boost::is_fundamental< T2 > ::type::value, T1, T2 >::type, typename boost::mpl::if_c < both_same, typename detail::select_most_precise::select_largest < second_larger, T1, T2 > ::type, typename detail::select_most_precise::select_floating_point < boost::is_floating_point< T1 > ::type::value, boost::is_floating_point< T2 > ::type::value, T1, T2 >::type > ::type >::type | type |
Static Public Attributes | |
static const bool | second_larger = sizeof(T2) > sizeof(T1) |
static const bool | one_not_fundamental |
static const bool | both_same |
Meta-function to select, of two types, the most accurate type for calculations.
select_most_precise classes, compares two types on compile time. For example, if an addition must be done with a double and an integer, the result must be a double. If both types are integer, the result can be an integer.
typedef boost::mpl::if_c< one_not_fundamental, typename detail::select_most_precise::select_non_fundamental < boost::is_fundamental<T1>::type::value, boost::is_fundamental<T2>::type::value, T1, T2 >::type, typename boost::mpl::if_c < both_same, typename detail::select_most_precise::select_largest < second_larger, T1, T2 >::type, typename detail::select_most_precise::select_floating_point < boost::is_floating_point<T1>::type::value, boost::is_floating_point<T2>::type::value, T1, T2 >::type >::type >::type boost::geometry::select_most_precise< T1, T2 >::type |
|
static |
|
static |
|
static |