This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Template Specialization Again


On Feb 14, 1999, Hirofumi SHINKE <shinke@newhouse.rim.or.jp> wrote:

> template <class T> void f(T x){ 
[snip]
> template <class T> void f<T *>(T x){ // error at this line!

> Dose it mean that egcs dosen't support this type of specialization yet?

There's no such thing as partial specialization of function templates.
C++ only supports partial specialization of class templates, and
explicit (full) specialization of function and class templates.  Try:

template <class T> void f(T* x) {

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]