Created
February 2, 2012 18:33
-
-
Save usagi/1725014 to your computer and use it in GitHub Desktop.
C++ std::complex declaration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace std { | |
template<class T> | |
class complex { | |
public: | |
typedef T value_type; | |
complex(const T& re = T(), const T& im = T()); | |
complex(const complex&); | |
template<class X> complex(const complex<X>&); | |
T real() const; | |
void real(T); | |
T imag() const; | |
void imag(T); | |
complex<T>& | |
operator= (const | |
T&); | |
complex<T>& | |
operator+=(const | |
T&); | |
complex<T>& | |
operator-=(const | |
T&); | |
complex<T>& | |
operator*=(const | |
T&); | |
complex<T>& | |
operator/=(const | |
T&); | |
complex& operator=(const complex&); | |
template<class X> complex<T>& operator= (const | |
complex<X>&); | |
template<class X> complex<T>& operator+=(const | |
complex<X>&); | |
template<class X> complex<T>& operator-=(const | |
complex<X>&); | |
template<class X> complex<T>& operator*=(const | |
complex<X>&); | |
template<class X> complex<T>& operator/=(const | |
complex<X>&); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment