boost::geometry::select_most_precise< T1, T2, T3 > Struct Template Reference

Meta-function to select, of two types, the most accurate type for calculations. More...

List of all members.

## Public Types

typedef select_most_precise < typename select_most_precise < T1, T2 >::type, T3 >::type | type

## Detailed Description

### template<typename T1, typename T2 = void, typename T3 = void>
struct boost::geometry::select_most_precise< T1, T2, T3 >

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.

Note:
  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.

## Member Typedef Documentation

template<typename T1, typename T2 = void, typename T3 = void>

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

April 2, 2011 | Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands Copyright © 2008-2011 Bruno Lalande, Paris, France Copyright © 2009-2010 Mateusz Loskot, London, UK