SourceForge Logo Tiny Vector Matrix library using Expression Templates Sourceforge Project Page

tvmet::PromoteTraits< T1org, T2org > Class Template Reference

#include <tvmet/TypePromotion.h>

List of all members.


Detailed Description

template<class T1org, class T2org>
class tvmet::PromoteTraits< T1org, T2org >

Promote type traits.


Public Types

typedef promoteTo< T1, T2,
promoteToT1 >::value_type 
value_type

Private Types

enum  {
  T1IsBetter = int(PrecisionTraits<T1>::rank) > int(PrecisionTraits<T2>::rank), knowBothRanks = PrecisionTraits<T1>::known && PrecisionTraits<T2>::known, knowT1butNotT2 = PrecisionTraits<T1>::known && !(PrecisionTraits<T2>::known), knowT2butNotT1 = PrecisionTraits<T2>::known && !(PrecisionTraits<T1>::known),
  T1IsLarger = sizeof(T1) >= sizeof(T2), defaultPromotion = knowT1butNotT2 ? false : (knowT2butNotT1 ? true : T1IsLarger), promoteToT1 = (knowBothRanks ? T1IsBetter : defaultPromotion) ? 1 : 0
}
typedef AutopromoteTraits<
T1org >::value_type 
T1
typedef AutopromoteTraits<
T2org >::value_type 
T2


Member Typedef Documentation

template<class T1org, class T2org>
typedef AutopromoteTraits<T1org>::value_type tvmet::PromoteTraits< T1org, T2org >::T1 [private]

template<class T1org, class T2org>
typedef AutopromoteTraits<T2org>::value_type tvmet::PromoteTraits< T1org, T2org >::T2 [private]

template<class T1org, class T2org>
typedef promoteTo<T1,T2,promoteToT1>::value_type tvmet::PromoteTraits< T1org, T2org >::value_type


Member Enumeration Documentation

template<class T1org, class T2org>
anonymous enum [private]

Enumerator:
T1IsBetter 
knowBothRanks 
knowT1butNotT2 
knowT2butNotT1 
T1IsLarger 
defaultPromotion 
promoteToT1 


Author: