where is the specialization?

Mark Mitchell mmitchell@usa.net
Tue Oct 14 10:28:00 GMT 1997


>>>>> "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




More information about the Gcc-bugs mailing list