upgrade_val< std::complex< T >, T2 > Struct Template Reference
[Traits]

upgrade a type to allow multiplication with a complex type e.g. the int in "int * complex<double>" is upgraded to a double More...

#include <traits.hpp>

List of all members.

Public Types

typedef std::complex< T > T1_result
typedef T T2_result

Static Public Member Functions

static arma_inline const
std::complex< T > & 
apply (const std::complex< T > &x)
static arma_inline const T apply (const T2 x)


Detailed Description

template<>
struct upgrade_val< std::complex< T >, T2 >

upgrade a type to allow multiplication with a complex type e.g. the int in "int * complex<double>" is upgraded to a double

Definition at line 677 of file traits.hpp.


Member Typedef Documentation

typedef std::complex<T> upgrade_val< std::complex< T >, T2 >::T1_result

Definition at line 679 of file traits.hpp.

typedef T upgrade_val< std::complex< T >, T2 >::T2_result

Definition at line 680 of file traits.hpp.


Member Function Documentation

static arma_inline const std::complex<T>& upgrade_val< std::complex< T >, T2 >::apply ( const std::complex< T > &  x  )  [inline, static]

Definition at line 682 of file traits.hpp.

00682 { return x;    }

static arma_inline const T upgrade_val< std::complex< T >, T2 >::apply ( const T2  x  )  [inline, static]

Definition at line 683 of file traits.hpp.

00683 { return T(x); }