>>214 書き写しミスでしたので訂正します。
- T re, im;
+ double re, im;
const complex& aのようにリファレンス使えといった点は、単純化のため考えないとしてください。

>>216
main.cpp:42: error: explicit specialization in non-namespace scope `class complex'
main.cpp:42: error: invalid use of undefined type `class complex'
main.cpp:37: error: forward declaration of `class complex'
main.cpp:42: error: abstract declarator `complex&()(complex)' used as declaration

main.cpp:42: error: syntax error before `{' token
main.cpp:44: error: syntax error before `+=' token

main.cpp:47: error: syntax error before `}' token

main.cpp: In member function `complex& complex::operator+=(T) [with T = complex]':
main.cpp:54: instantiated from here

main.cpp:41: error: no match for 'operator+=' in 'this->complex::re += a'
37: class complex {
38:   double re, im;
39: public:
40:   complex() : re(0), im(0) { };
41:   template<class T> complex& operator+=(T a) { re += a; return *this; };
42:   template<> complex& operator+=<complex>(complex a) {
43:     re += a.re;
44:     im += a.im;
45:     return *this;
46:   };
47: };