From 7612402067742127977
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ede379f5dbbc1549
X-Google-Attributes: gidf78e5,public
From: sirwillard@my-deja.com
Subject: Re: Suggestion: "typeof" keyword
Date: 1999/08/12
Message-ID: <7oup0a$8g2$1@nnrp1.deja.com>#1/1
X-Deja-AN: 511886867
Approved: Valentin Bonnard <bonnard@clipper.ens.fr>
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>
X-Original-Date: Thu, 12 Aug 1999 15:25:13 GMT
X-Authentication-Warning: backdraft.briar.org: smap set sender to <news@dejanews.com> using -f
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)
X-Http-Proxy: 1.1 x29.deja.com:80 (Squid/1.1.22) for client 167.16.75.51
Organization: Deja.com - Share what you know. Learn what you don't.
X-Article-Creation-Date: Thu Aug 12 15:25:13 1999 GMT
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUAN7LntawEuYhIxRhxAQGqFwH/YfvtR3Yb8cBNxDRaoQ6peU4FGGETYHGJ sQHrHDgE0o/H8VDuZPHJshOU6vcBemE3Iq23Hi8N3Uw9ShyjS/UicA== =6oEP
X-MyDeja-Info: XMYDJUIDsirwillard
Newsgroups: comp.std.c++

In article <t7r9laz5hj.fsf@calumny.jyacc.com>,
  Hyman Rosen <hymie@prolifics.com> wrote:
> Francis Glassborow <francis@robinton.demon.co.uk> writes:
> > In order to gain support you need to explain carefully  (with
examples)
> > exactly what it is to do and what kind of non-academic problem it
will
> > solve.  Code examples help.
>
> The basic problem it addresses is that there is no way, in general,
> to obtain the type of an expression as a typename that can be used
> in further declarations. This is especially a problem with templates.

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);


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
---
[ 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              ]



