[C++]complex with int type
#include <complex> #include <iostream> using namespace std; int main(void ) { complex< int> z(20, 200); cout << abs< int>(z) << endl; return 0; }
According to the C++ ISO spec, §26.2/2:
The effect of instantiating the template
complex
for any type other thanfloat
,double
orlong double
is unspecified.