boost::geometry::select_most_precise
select_most_precise.hpp
typename T1 T1
typename T2 T2 void
typename T3 T3 void
select_most_precise< typename select_most_precise< T1, T2 >::type, T3 >::type typedef select_most_precise< typename select_most_precise<T1, T2>::type, T3 >::type boost::geometry::select_most_precise< T1, T2, T3 >::type type

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.

It is different from the "promote" class, already in boost. That class promotes e.g. a (one) float to a double. This class selects a type from two types. It takes the most accurate, but does not promote afterwards.

This traits class is completely independant from GGL and might be a separate addition to Boost

If the input is a non-fundamental type, it might be a calculation type such as a GMP-value or another high precision value. Therefore, if one is non-fundamental, that one is chosen.

If both types are non-fundamental, the result is indeterminate and currently the first one is chosen.

- boost::geometry::select_most_precise
  type