From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9cccf6ef6149fdaa X-Google-Attributes: gid103376,public From: Hyman Rosen Subject: Re: Ada Date: 2000/01/04 Message-ID: #1/1 X-Deja-AN: 568231192 Sender: hymie@calumny.jyacc.com References: <38620350.48F8FC08@gecm.com> <83tohh$q2s$1@nnrp1.deja.com> <83u8l0$5i5$1@nnrp1.deja.com> <84rd2f$snm$1@nntp3.atl.mindspring.net> <84t8b1$ar5$1@nnrp1.deja.com> X-Complaints-To: abuse@panix.com X-Trace: news.panix.com 947007440 7079 209.49.126.226 (4 Jan 2000 17:37:20 GMT) Organization: PANIX Public Access Internet and UNIX, NYC NNTP-Posting-Date: 4 Jan 2000 17:37:20 GMT Newsgroups: comp.lang.ada Date: 2000-01-04T17:37:20+00:00 List-Id: Robert Dewar writes: > A pretty big gap! It means for example that if you have > multiple implementations of sets, that you cannot have > a parameterless function Empty that returns the (appropriate) > empty set. Incorrect as far as equivalent behavior is concerned, as the following program demonstrates. enum SetType { A, B, C }; template struct Set { static Set Empty() { return Set(); } }; struct EmptySet { template operator Set() { return Set::Empty(); } }; void f(Set) { } void g(Set) { } int main() { f(EmptySet()); g(EmptySet()); }