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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,59d666bca086a225 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news4.google.com!news2.volia.net!newsfeed.utanet.at!newsfeed.inode.at!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Ada & MacOS Date: Tue, 07 Feb 2006 17:13:15 +0100 Organization: Cablecom Newsserver Message-ID: <3719494.Y8Gt3qVyd6@linux1.krischik.com> References: <1776691.hMkAr8ZQHy@linux1.krischik.com> <6SuEf.155126$dP1.513381@newsc.telia.net> <1289921.BRApYLEfLn@linux1.krischik.com> <4047936.ucMNu27ket@linux1.krischik.com> <1139258071.934930.179710@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: 84-74-134-212.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1139331604 23230 84.74.134.212 (7 Feb 2006 17:00:04 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Tue, 7 Feb 2006 17:00:04 +0000 (UTC) User-Agent: KNode/0.10 Xref: g2news1.google.com comp.lang.ada:2806 Date: 2006-02-07T17:13:15+01:00 List-Id: Hyman Rosen wrote: >> Of corse not at easy as displayed here. It was deeply nested inside a >> template. So one could not the see the type mismatch imediatly. > > The same compiler as above, with a template: > "ComeauTest.c", line 2: error: a reference of type "int &" (not > const-qualified) > cannot be initialized with a value of type "unsigned int" > R &key (P &x) { return x; } > ^ > detected during instantiation of > "R &key(P &) [with R=int, P=unsigned int]" Then there is hope for C++ after all - at least one compiler which gets it right. >> But how about a little quiz: Which of the two compiler in question where >> right? > Neither, of course. Well then we know what IBM C++ (3.08) and MS C++ (Studio.NET) have in common ;-) . Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com