#include <string.h> #define MEM_COPY(from,to,size) memcpy((to),(from),(size))
#define MEMCOPY(from,to,n_items,type) \ MEM_COPY((char *)(from),(char *)(to),(unsigned)(n_items)*sizeof(type)) template <typename T> class RPGVec { public: virtual int Copy( RPGVec<T> &Vin); } template <typename T> int RPGVec<T>::Copy( RPGVec<T> &Vin) { MEMCOPY( Vin.Adr(), this->Adr(), 10, T); return SUCCES; } error: there are no arguments to `MEM_COPY' that depend on a template parameter, so a declaration of `MEM_COPY' must be available How do I fix this ? Thank you -- Summary: Using predefined macros inside the template function errors out in compilation Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: raviprakashg at hotmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33336