2 // GROUPS passed constructors
15 complex() { re=im=0; magic=MAGIC; }
16 complex(double d) { re=d; im=0; magic=MAGIC; }
17 complex(double d, double d2) {re=d; im=d2; magic=MAGIC; }
18 ~complex() {if(magic!=MAGIC) {std::printf("FAIL\n"); std::exit(1);}}
19 friend std::ostream& operator << (std::ostream& o, const complex& c)
20 { return o << "(" << c.re << "," << c.im << ")"; }
27 complex v[6] = {1, complex(1,2), complex(), 2 }; // ARM Sect. 12.6.1
31 std::printf ("PASS\n");