From -1877660116390876275
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,7458762a2c3b301d
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-08-23 15:57:01 PST
Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: joerg.barfurth@attglobal.net (Joerg Barfurth)
Newsgroups: comp.std.c++
Subject: Re: Are literals const?
Date: Thu, 23 Aug 2001 22:55:57 GMT
Organization: My beloved Family
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <1eylyrg.gd69zat6jhigN%joerg.barfurth@attglobal.net>
References: <7dc3b1ea.0108220617.421ee131@posting.google.com> <1eykhdu.1cqeruv1s5f35sN%joerg.barfurth@attglobal.net> <3B84C702.908D52C6@divalsim.it>
X-Trace: mail2news.demon.co.uk 998607365 mail2news:22659 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
User-Agent: MacSOUP/D-2.4.6 (unregistered for 408 days)
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mulga.cs.mu.OZ.AU id IAA06214
Lines: 35
Xref: archiver1.google.com comp.std.c++:7107

Nicola Musatti <objectway@divalsim.it> wrote:

> Joerg Barfurth wrote:
> [...]
> > (Note: rvalues of builtin types are never const.)
>=20
> Isn't it rather the reverse? rvalues of builtin types aren't modifiable=
;
> moreover, the only way to *directly* modify an rvalue is to call a non
> const member function on it.

According to 3.10/9 rvalues of non-class types have cv-unqualified
types. You might say that the categories of constness and volatileness
don't apply to them. IOW within the framework of the C++ type systems
the type of an int rvalue is always 'int' which is not const (whereas
the type of an rvalue of class type may be cv-qualified.

This remains true, even though you can't modify such an rvalue. This
fact isn't true because of the type, but because such an rvalue is a
value - not an object.

Regards, J=F6rg

--=20
J=F6rg Barfurth                         joerg.barfurth@attglobal.net
<<<<<<<<<<<<< using std::disclaimer;  <<<<<<<<<<<<<<<<<<<<<<<<<<<<
Software Developer                    http://www.OpenOffice.org
StarOffice Configuration              http://www.sun.com/staroffice

---
[ 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://www.research.att.com/~austern/csc/faq.html                ]



