This is the mail archive of the gcc-bugs@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: where is the specialization?



>>>>> "Alexandre" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:

    Alexandre> Yotam Medini writes:

    >> Am I missing a new syntax?

    Alexandre> Yup.  For declaring a template explicit specialization,
    Alexandre> you must precede it with `template <args>', even if the
    Alexandre> list of arguments is empty.  Thus, you should have
    Alexandre> declared:

    Alexandre>      template <>
    >> const char* C<int>::say() { return "I am int"; }

    Alexandre>      template <>
    >> const char* C<float>::say() { return "I am float"; }

    Alexandre> Unfortunately, it seems that egcs does not accept this
    Alexandre> syntax yet.  It says:

It should accept this syntax.  I will look into this bug sometime this
week.

    Alexandre> -- Alexandre Oliva mailto:oliva@dcc.unicamp.br
    Alexandre> mailto:aoliva@acm.org http://www.dcc.unicamp.br/~oliva
    Alexandre> Universidade Estadual de Campinas, SP, Brasil

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu



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