From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9e2eabfc9521d0b4,start X-Google-Attributes: gidfee84,public From: nkauer@my-deja.com Subject: Compaq C++ templates: bug? Date: 2000/06/14 Message-ID: <8i8irq$96h$1@nnrp1.deja.com>#1/1 X-Deja-AN: 634498528 X-Http-Proxy: 1.1 x56.deja.com:80 (Squid/1.1.22) for client 128.104.49.234 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Jun 14 18:28:33 2000 GMT X-MyDeja-Info: XMYDJUIDnkauer Newsgroups: comp.unix.osf.osf1 X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95) With the code below and using Compaq C++ V6.2-024 for Digital UNIX V4.0F I get this error message multiple times: "cannot overload functions based on pointer size of the parameters alone" Basically everytime I "mention" a specialization of a template that has the values of an enumeration as only parameter, I get this error. Is this a current limitation of Compaq's C++ compiler template implementation or is there something wrong with my code? Any clues are greatly appreciated. Nikolas ---------------------------------------------------------------- in header files: enum Subprocess { gg, gu, gd, gub, gdb, uub, ddb }; template void off_shell_top_jet_func(const double x[], const int k[], const double& wgt, const double aux[], double f[]); typedef void (*Integrand)(const double x[], const int k[], const double& wgt, const double aux[], double f[]); class Xcalc { public: Xcalc(int cdim, int cnbin, int ddim, int adim, int nvals[], int fn_, Integrand fxn, int ncpu_ = 1); void set_integrand(Integrand fxn); [...] }; ------------------------------------------------------------------------ in main.cpp: int main() { [...] Xcalc xcalc(cdim, cnbin, ddim, adim, nvals_gg, fn_, &off_shell_top_jet_func); => this is OK [...] xcalc.set_integrand(&off_shell_top_jet_func); => error message [...] } ------------------------------------------------------------------------ in different translation unit: // explicitly instantiate specializations used in main.cpp template void off_shell_top_jet_func(const double x[], const int k[], const double& wgt, const double aux[], double f[]); => error message template void off_shell_top_jet_func(const double x[], const int k[], const double& wgt, const double aux[], double f[]); => error message [...] template void off_shell_top_jet_func(const double x[], const int k[], const double& wgt, const double aux[], double f[]) { [...] } Sent via Deja.com http://www.deja.com/ Before you buy.