From: Neal D. Becker (ndbecker2_at_[hidden])
Date: 2004-07-15 14:34:56


I found numeric::ublas::promote_traits to be pretty useful. This tiny
addition is also useful to go the other direction:

#include <complex>

template<typename T>
struct Scalar {
  typedef T type;
};

template<typename T>
struct Scalar<std::complex<T> > {
  typedef T type;
};