/in/foo.cc:26:48: warning: friend declaration 'void Swap(CArrary<T>, CArrary<T>)' declares a non-template function [-Wnon-template-friend]
friend void Swap(CArrary<T> a, CArrary<T> b);
^
/in/foo.cc:26:48: note: (if this is not what you intended, make sure the function template has already been declared and add <> after the function name here)
/in/foo.cc: In member function 'CArrary<T>& CArrary<T>::operator=(const CArrary<T>&)':
/in/foo.cc:99:25: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if(ptr)
^~
/in/foo.cc:101:29: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
ptr=new T[a.size];
^~~
/in/foo.cc: In function 'void Swap(CArrary<T>, CArrary<T>)':
/in/foo.cc:112:18: error: expected type-specifier before '[' token
T * tmp=new[b.size];
^
/in/foo.cc:117:20: error: expected type-specifier before '[' token
a.ptr=new[b.size];
^
/in/foo.cc:117:20: error: expected ';' before '[' token