Loading src/Complex.h +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ Please see full open source license included in file LICENSE. #define PSICOMPLEX_H_ #include <complex> #include "loki/TypeTraits.h" namespace std { inline double real(double t) { return t; } Loading Loading @@ -64,6 +66,11 @@ class IsComplexNumber<std::complex<T> > { public: enum { True = true}; }; template<typename T> struct IsNumber { enum {True = (IsComplexNumber<T>::True || Loki::TypeTraits<T>::isArith)}; }; } // namespace PsimagLite #endif // PSICOMPLEX_H_ Loading src/Vector.h +2 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,8 @@ operator<=(vector<T2,A>& v, } template<typename T1,typename T2,typename A> void operator<=(vector<T2,A>& v, typename PsimagLite::EnableIf<PsimagLite::IsNumber<T1>::True && PsimagLite::IsNumber<T2>::True, void>::Type operator<=(vector<T2,A>& v, const ClosureOperator<T1, ClosureOperator<T2,std::vector<T2,A>,ClosureOperations::OP_MULT>, ClosureOperations::OP_MULT>& c) Loading Loading
src/Complex.h +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ Please see full open source license included in file LICENSE. #define PSICOMPLEX_H_ #include <complex> #include "loki/TypeTraits.h" namespace std { inline double real(double t) { return t; } Loading Loading @@ -64,6 +66,11 @@ class IsComplexNumber<std::complex<T> > { public: enum { True = true}; }; template<typename T> struct IsNumber { enum {True = (IsComplexNumber<T>::True || Loki::TypeTraits<T>::isArith)}; }; } // namespace PsimagLite #endif // PSICOMPLEX_H_ Loading
src/Vector.h +2 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,8 @@ operator<=(vector<T2,A>& v, } template<typename T1,typename T2,typename A> void operator<=(vector<T2,A>& v, typename PsimagLite::EnableIf<PsimagLite::IsNumber<T1>::True && PsimagLite::IsNumber<T2>::True, void>::Type operator<=(vector<T2,A>& v, const ClosureOperator<T1, ClosureOperator<T2,std::vector<T2,A>,ClosureOperations::OP_MULT>, ClosureOperations::OP_MULT>& c) Loading