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++ - Explicit Template Specification
I have some code which I have used for some time with Symantec and now DM C++. This code has template classes with frien operators such as template <class T> class Complex { ...... public: friend ostream & operator<< (ostream&, const Complex<T>&); }; When I moved this code to gcc I found that the definition had to be changed to template <class T> class Complex { ...... public: friend ostream & operator<< <> (ostream&, const Complex<T>&); }; for the function a template friend. This change is a consequence (as I understand it) of "Explicit Template Specification". It makes code which used to work not work. How is this going to be handled in the development of DM? At the moment I have in my code things like this: friend ostream & operator<< TT (ostream&, const Complex<T>&); where TT has to be given an appropriate define. Cheers John Oct 10 2001
Does it no longer work with DMC? John Fletcher wrote in message <3BC45E1C.D684997A aston.ac.uk>...I have some code which I have used for some time with Symantec and now DM C++. This code has template classes with frien operators such as template <class T> class Complex { ...... public: friend ostream & operator<< (ostream&, const Complex<T>&); }; When I moved this code to gcc I found that the definition had to be changed to template <class T> class Complex { ...... public: friend ostream & operator<< <> (ostream&, const Complex<T>&); }; for the function a template friend. This change is a consequence (as I understand it) of "Explicit Template Specification". It makes code which used to work not work. How is this going to be handled in the development of DM? At the moment I have in my code things like this: friend ostream & operator<< TT (ostream&, const Complex<T>&); where TT has to be given an appropriate define. Cheers John Oct 10 2001
Walter wrote:Does it no longer work with DMC?How is this going to be handled in the development of DM? At the moment I have in my code things like this: friend ostream & operator<< TT (ostream&, const Complex<T>&); where TT has to be given an appropriate define. Oct 11 2001
John Fletcher wrote in message <3BC55E8F.52955430 aston.ac.uk>...My question is, will it change? Oct 11 2001
Walter wrote:John Fletcher wrote in message <3BC55E8F.52955430 aston.ac.uk>...My question is, will it change? Oct 11 2001
John Fletcher wrote in message <3BC5813B.ED894AC0 aston.ac.uk>...Got it. That fixes it so that my examples run. Oct 11 2001
In the SGI-STL.tar.gz is a directory SC with about 18 test programs... I do not know if you got those already?! Jan Walter wrote:John Fletcher wrote in message <3BC5813B.ED894AC0 aston.ac.uk>...Got it. That fixes it so that my examples run. Oct 11 2001
|