Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Template use not valid ?
I use DMC++ (8.32) to compile some C & C++ files. Their author use OpenWatcom, gcc & vc6 to compile these files. The function definition line gives an error. How can I get this compiled ? sc SRC\PROCESS\combine.cpp -p -J -mn -C -WA -f -S -5 -a1 -c -gf -DFFTW_ENABLE_FLOAT -Ic:\temp\grafix\cd_iup_img\imlab_sc\include -Ic:\temp \grafix\cd_iup_img\imlab_sc\src -Ic:\temp\grafix\cd_iup_img\imlab_sc\src\mm -Ic:\temp\grafix\cd_iup_img\imlab_sc\src\i Error: C:\TEMP\Grafix\CD_IUP_IMG\imlab_sc\SRC\PROCESS\combine.cpp(27): storage class is illegal in this context Error: C:\TEMP\Grafix\CD_IUP_IMG\imlab_sc\SRC\PROCESS\combine.cpp(38): storage class is illegal in this context Lines Processed: 1060551 Errors: 2 Warnings: 14 Build failed template <class T> static inline T blend_op(const T& v1, const T& v2, const imReal& alpha) { return (T)(alpha*v1 + (1.0f - alpha)*v2); } static inline imComplex blend_op_cpx(const imComplex& v1, const imReal& v2, const imReal& alpha) { return alpha*v1 + (1.0f - alpha)*v2; } template <class T> static inline T backsub_op(const T& v1, const T& v2, const T& tol, int use_diff) { T diff = diff_op(v1, v2); if(diff <= tol) return (T)0; else { if(use_diff) return (T)diff; else return (T)v1; } } Mar 12 2003
That should work with the latest DMC++ beta. "Jean-Pierre H. Dumas" <jeanpierre.dumas freesbee.fr> wrote in message news:1103_1047497797 news.digitalmars.com...I use DMC++ (8.32) to compile some C & C++ files. Their author use OpenWatcom, gcc & vc6 to compile these files. The function definition line gives an error. How can I get this compiled ? sc Mar 12 2003
|