From 7923856472089562231
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ede379f5dbbc1549
X-Google-Attributes: gidf78e5,public
From: sbnaran@uiuc.edu (Siemel B. Naran)
Subject: Re: Suggestion: "typeof" keyword
Date: 1999/08/13
Message-ID: <slrn7r5tfr.kn9.sbnaran@localhost.localdomain>#1/1
X-Deja-AN: 512134876
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <7nt3vl$1oe$1@nnrp1.deja.com> <7oh7o8$t3f$1@nnrp1.deja.com> <7ol6hi$ej9$2@news.BelWue.DE> <cTiioXAhAwr3Ew$X@robinton.demon.co.uk> <t7d7ww1vrz.fsf@calumny.jyacc.com> <e4DSyfA4ALs3Ew0Q@robinton.demon.co.uk> <t7r9laz5hj.fsf@calumny.jyacc.com> <7oup0a$8g2$1@nnrp1.deja.com>
X-Original-Date: 13 Aug 1999 02:44:55 GMT
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 934520477 30078 128.250.29.17 (13 Aug 1999 05:01:17 GMT)
Organization: University of Illinois at Urbana-Champaign
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN7OmiuEDnX0m9pzZAQFGxwGAim7wO/SJWQgR+TOjlzpK8MY3ra4z87oI +nSyaSka6ygYWJuweS/wdVgv3z7eMavT =49Fs
User-Agent: slrn/0.9.5.7 (UNIX)
Reply-To: sbnaran@uiuc.edu
NNTP-Posting-Date: 13 Aug 1999 05:01:17 GMT
Newsgroups: comp.std.c++

On 12 Aug 99 15:26:43 GMT, sirwillard@my-deja.com

>Though I'd like the introduction of typeof, I feel someone should play
>at least a bit of devils advocate.  What should be the result of the
>following?
>
>base* p = new derived;
>typeof(*p) copy(*p);

This 'typeof' thing is entirely compile time, as opposed to 'typeid'
which is compile time or run time.  Hence "typeof(*p)" is "base".
   base * p=new derived;
   base copy(p);

-- 
----------------------------------
Siemel B. Naran (sbnaran@uiuc.edu)
----------------------------------
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



