S
SzH
The code below compiles with gcc, but not with Digital Mars C++ (dmc).
Is the code wrong or is there a bug in dmc?
template<typename T> class arr { T x; };
template<void (*D)(const arr<double>)> class ode { };
void fun(const arr<double>) { }
int main() {
ode<fun> odeInst;
return 0;
}
dmc gives the following error message:
ode<fun> odeInst;
^
sim.cpp(9) : Error: need explicit cast to convert
from: void (*C func)(const arr<double >)
to : void (*C func)(const arr<double >)
--- errorlevel 1
Is the code wrong or is there a bug in dmc?
template<typename T> class arr { T x; };
template<void (*D)(const arr<double>)> class ode { };
void fun(const arr<double>) { }
int main() {
ode<fun> odeInst;
return 0;
}
dmc gives the following error message:
ode<fun> odeInst;
^
sim.cpp(9) : Error: need explicit cast to convert
from: void (*C func)(const arr<double >)
to : void (*C func)(const arr<double >)
--- errorlevel 1