#ifndef TRIQS_UTILITY_COMPLEX_OPS_H #define TRIQS_UTILITY_COMPLEX_OPS_H #include inline std::complex operator"" _j ( long double x ) { return std::complex(0,x); } inline std::complex operator"" _j ( unsigned long long x ) { return std::complex(0,x); } namespace std { // has to be in the right namespace for ADL ! template std::complex operator+(std::complex const & a, long b) { return a+T(b);} template std::complex operator+(long a, std::complex const & b) { return T(a)+b;} template std::complex operator-(std::complex const & a, long b) { return a-T(b);} template std::complex operator-(long a, std::complex const & b) { return T(a)-b;} template std::complex operator*(std::complex const & a, long b) { return a*T(b);} template std::complex operator*(long a, std::complex const & b) { return T(a)*b;} template std::complex operator/(std::complex const & a, long b) { return a/T(b);} template std::complex operator/(long a, std::complex const & b) { return T(a)/b;} } #endif