public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@cygnus.com>
To: Oleg Krivosheev <kriol@fnal.gov>
Cc: egcs@cygnus.com
Subject: Re: something wrong with template instantiation mechanics
Date: Fri, 10 Oct 1997 17:19:00 -0000	[thread overview]
Message-ID: <u9yb41tonr.fsf@yorick.cygnus.com> (raw)
In-Reply-To: <Pine.GSO.3.96.971010135321.7378B-100000@drabble>

>>>>> Oleg Krivosheev <kriol@fnal.gov> writes:

> ok, reading again CD2:

>   as  friends.   The preempt functions might be defined as a template as
>   follows
>           template<class T> task<T>* preempt(task<T>* t) { /* ... */ }

> it looks for me that i'v declared/defined 
> abs and op+ in exactly the same manner as proposed in CD2.

That example is out of date, and is not normative in any case.  But this is:

  14.5.5  Function templates                                  [temp.fct]

2 A function template can be overloaded with  other  function  templates
  and  with  normal  (non-template) functions.  A normal function is not
  related to a function template (i.e., it is never considered to  be  a
  specialization),  even  if  it  has the same name and type as a poten-
  tially generated function template specialization.3)
  _________________________
  3) That is, declarations of non-template functions do not merely guide
  overload resolution of template functions with the same name.  If such
  a non-template function is used in a program, it must be  defined;  it
  will  not be implicitly instantiated using the function template defi-
  nition.

Jason

  reply	other threads:[~1997-10-10 17:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3439FE5B.53F1D3CC.cygnus.egcs@msu.ru>
1997-10-07  3:15 ` AIX & shared libstdc++ Jason Merrill
1997-10-07  3:48   ` Andrey Slepuhin
1997-10-09  9:26   ` Andrey Slepuhin
1997-10-09 15:14     ` Ian Lance Taylor
1997-10-13  5:05       ` Andrey Slepuhin
1997-10-09 16:31     ` something wrong with template instantiation mechanics Oleg Krivosheev
1997-10-10  8:51       ` Joe Buck
1997-10-10  8:51       ` Joe Buck
1997-10-10  8:51         ` Oleg Krivosheev
1997-10-10  8:51           ` Oleg Krivosheev
     [not found]           ` <Pine.GSO.3.96.971009232426.6908A-100000.cygnus.egcs@drabble>
1997-10-10 11:44             ` Jason Merrill
1997-10-10 17:21               ` Oleg Krivosheev
1997-10-10 17:19                 ` Jason Merrill [this message]
1997-10-10 11:46         ` Oleg Krivosheev
1997-10-10 20:46           ` Alexandre Oliva
     [not found] <orbu0tza3m.fsf@sunsite.dcc.unicamp.br>
1997-10-13 13:41 ` Oleg Krivosheev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u9yb41tonr.fsf@yorick.cygnus.com \
    --to=jason@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=kriol@fnal.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).