Thread View: comp.std.c++
1 messages
1 total messages
Started by Herb Sutter
Thu, 24 Aug 1995 22:40
Re: Equivalence of A and A<>
Author: 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. ]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads