🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3984

Template Syntax

#3984
From: Scott Meyers
Date: Thu, 11 Apr 1996 00:06
32 lines
1775 bytes
I was under the impression that the use of a template name inside the
definition of a class template was implicitly considered to be qualified
by the template parameter(s).  For example, I thought that in

  template <class T>
  class Array {
  public:
    Array operator=(const Array& rhs);
    ...
  };
  
the declaration of operator= was legal, because the use of the token
"Array" as a return type and a paramter was implicitly treated as if it
were "Array<T>." Many compilers accept this, but I'm told that several
reject it, and I can't find language in the January DWP that allows it. 

  1.  Is the above syntax valid, or must "Array" always be specified as
      "Array<T>"? 

  2.  If the above is not valid, was it valid at one time (post-ARM)?
      If so, when and why was it disallowed? 
  
Thanks,

Scott
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]
Technical Details
Message-ID: <199604102351.QAA11178@netcom15.netcom.com>
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern
From: Scott Meyers <smeyers@netcom.com>
Newsgroups: comp.std.c++
Subject: Template Syntax
Date: 10 Apr 1996 17:06:28 PDT
Organization: -
Approved: austern@isolde.mti.sgi.com
Message-ID: <199604102351.QAA11178@netcom15.netcom.com>
NNTP-Posting-Host: isolde.mti.sgi.com
X-Original-Date: Wed, 10 Apr 96 16:51:50 -0700
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBVAwUBMWxNBky4NqrwXLNJAQHHnwH/eBDGmwumTvyq+oPd/JM33vySUZK5TG2H
 zsLFeOpw6lPOqPyg6MpnOU3QvwiPN70ko0OvAIfl+6N0P8P6JNdR/Q==
 =9Vom
Originator: austern@isolde.mti.sgi.com