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 mangling bug in egcs-2.90.16


>>>>> Tom Kunert <tom@rp168.urz.tu-dresden.de> writes:

> Oops. Sorry. I refer to the example in section 14.5.3. There is a friend
> function, which depends on the template-parameter. This function is
> defined as a function-template. 

That example was obsolete, and in any case examples are not normative.  The
October 1997 draft (not public comment) is very explicit:

  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.5)

  _________________________
  5) 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


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