42 #ifndef _TEUCHOS_PROMOTION_TRAITS_HPP_
43 #define _TEUCHOS_PROMOTION_TRAITS_HPP_
49 template <
class A,
class B>
56 template <
class T>
class PromotionTraits<T,T> {
61 #define PT_SPEC(type1,type2,type3) \
62 template <> class PromotionTraits< type1 , type2 > { \
64 typedef type3 promote; \
66 template <> class PromotionTraits< type2 , type1 > { \
68 typedef type3 promote; \
71 #ifdef HAVE_TEUCHOS_COMPLEX
72 PT_SPEC(
double,std::complex<float>,std::complex<double>)
73 PT_SPEC(
float,std::complex<double>,std::complex<double>)
74 PT_SPEC(
float,std::complex<float>,std::complex<float>)
75 PT_SPEC(
double,std::complex<double>,std::complex<double>)
77 PT_SPEC(
double,
float,
double)
78 PT_SPEC(
double,
long,
double)
79 PT_SPEC(
double,
int,
double)
80 PT_SPEC(
float,
long,
float)
81 PT_SPEC(
float,
int,
float)
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...