public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [Q] about template specialization
@ 1998-04-25 11:59 Ruslan Shevchenko
  1998-04-27  0:33 ` Alexandre Oliva
       [not found] ` <orlnsrvlnc.fsf.cygnus.egcs@garnize.lsd.dcc.unicamp.br>
  0 siblings, 2 replies; 3+ messages in thread
From: Ruslan Shevchenko @ 1998-04-25 11:59 UTC (permalink / raw)
  To: egcs; +Cc: egcs

look at the next code:

template<class K, class E>
inline
const K& default_key(const E&);

template<class T>
inline
const T& default_key(const T& x)
{
  return x;
}

than, in

template<class K, class E>
class X
{

........

   virtual const K& get_key(const E& x)
    { return  default_key<K,E>(x); }

};

than, lets look on class X<Y,Y>

I think  that  X<Y,Y>::get_key must call specialization (i. e. second
definition)
Actually, in egcs it is wrong.

So, what standart behavior ?

Thanks.


--

    @=
     //RSSH                              mailto:Ruslan@Shevchenko.Kiev.UA




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-04-27 17:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-25 11:59 [Q] about template specialization Ruslan Shevchenko
1998-04-27  0:33 ` Alexandre Oliva
     [not found] ` <orlnsrvlnc.fsf.cygnus.egcs@garnize.lsd.dcc.unicamp.br>
1998-04-27 17:27   ` Nathan Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).