main.cc:47:2: error: ‘vec::~vec()’ cannot be overloaded with ‘vec::~vec()’ ~vec(){/* GC_FREE(data);*/} // destructor ^ main.cc:30:2: note: previous declaration ‘vec::~vec()’ ~vec(){/* GC_FREE(data);*/} // destructor ^ main.cc:48:10: error: ‘double& vec::operator[](int)’ cannot be overloaded with ‘double& vec::operator[](int)’ double& operator[](int i){return data[i];} // v[i]=x; ^~~~~~~~ main.cc:32:10: note: previous declaration ‘double& vec::operator[](int)’ double& operator[](int i){return data[i];} // v[i]=x; ^~~~~~~~ main.cc:49:10: error: ‘double& vec::operator()(int)’ cannot be overloaded with ‘double& vec::operator()(int)’ double& operator()(int i){return data[i];} // v(i)=x; ^~~~~~~~ main.cc:33:10: note: previous declaration ‘double& vec::operator()(int)’ double& operator()(int i){return data[i];} // v(i)=x; ^~~~~~~~ main.cc:50:7: error: ‘void vec::operator*=(double)’ cannot be overloaded with ‘void vec::operator*=(double)’ void operator*=(double x){FOR(i)SELF[i]*=x;} ^~~~~~~~ main.cc:34:7: note: previous declaration ‘void vec::operator*=(double)’ void operator*=(double x){FOR(i)SELF[i]*=x;} ^~~~~~~~ main.cc:51:6: error: ‘vec vec::operator+(vec)’ cannot be overloaded with ‘vec vec::operator+(vec)’ vec operator+(vec b){ // a+b => (a).operator+(b) ^~~~~~~~ main.cc:35:6: note: previous declaration ‘vec vec::operator+(vec)’ vec operator+(vec b){ // a+b => (a).operator+(b) ^~~~~~~~ main.cc:57:7: error: ‘void vec::print(const char*)’ cannot be overloaded with ‘void vec::print(const char*)’ void print(const char* s){ ^~~~~ main.cc:41:7: note: previous declaration ‘void vec::print(const char*)’ void print(const char* s){ ^~~~~ In file included from /usr/local/include/gc.h:2, from main.cc:4: main.cc: In constructor ‘vec::vec(vec&&)’: main.cc:26:34: error: ‘n’ was not declared in this scope data=(double*)GC_MALLOC_ATOMIC(n*sizeof(double)); ^ main.cc: In function ‘int main()’: main.cc:69:6: error: use of deleted function ‘constexpr vec& vec::operator=(const vec&)’ u=v+w; ^ main.cc:8:8: note: ‘constexpr vec& vec::operator=(const vec&)’ is implicitly declared as deleted because ‘vec’ declares a move constructor or move assignment operator struct vec { ^~~ make: *** [: main] Error 1