Article View: comp.std.c++
Article #1842Re: Equivalence of A and A<>
From: Herb Sutter
Date: Thu, 24 Aug 1995 22:40
Date: Thu, 24 Aug 1995 22:40
34 lines
1888 bytes
1888 bytes
esap@cs.tut.fi (Pulkkinen Esa) wrote: >In article <199508241251.IAA03008@gold.interlog.com>, >Herb Sutter <herbs@interlog.com> wrote: >>> A<> *p1; // The legal way to default the argument >>> A *p2; // Syntax error >> >>If the latter was allowed, it would be ambiguous if a non-templated class A >>existed. > >"The name of a class template shall not be declared to refer >to any other template, class, function, object, enumeration, enumerator, >namespace, value or type in the same scope. ..." Mea culpa #1. I seem to have messed up rather awfully; two glaring errors in one article! Here's the other: >You can't have a function and a variable >with the same name anyway. The reason for not allowing function calls >without () is (IMHO it's a shame) that you couldn't differentiate >between the function and its address (since function's name without () >means its address). >Or am I missing something? No; it's been a long day. :) Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Herb Sutter 2228 Urwin, Ste 102 voice (416) 618-0184 Connected Object Solutions Oakville ON Canada L6L 2T2 fax (905) 847-6019 [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<41iv4g$cku@engnews2.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamageShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage From: herbs@interlog.com (Herb Sutter) Newsgroups: comp.std.c++ Subject: Re: Equivalence of A and A<> Date: 24 Aug 1995 22:40:16 GMT Organization: Daystar Software Systems Design Inc. Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <41iv4g$cku@engnews2.Eng.Sun.COM> NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text Content-Length: 1187 X-Lines: 30 Originator: clamage@taumet