🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1021

What is int &volatile r; [Was: What is int &const r;]

#1021
From: Tom Ngo
Date: Thu, 18 Apr 1991 02:42
20 lines
940 bytes
I wrote:

>Here's an interesting C++ statement.  What does it mean?
>    int &const r;
>Hopefully your answer is that it is illegal and/or meaningless.  If

Harald Fuchs replied:

Fuchs> A reference is always constant, so "int&const r" is just a more
Fuchs> verbose alternative to "int& r". Why bother with explicitly
Fuchs> disallowing redundancies?

OK, I can accept that.  But what is "int &volatile r"?

--Tom
--
  Tom Ngo
  ngo@harvard.harvard.edu
  617/495-1768 lab number, leave message
Technical Details
Message-ID: <NGO.91Apr17224214@tammy.harvard.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!hsdndev!husc6!ngo

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!hsdndev!husc6!ngo
From: ngo@tammy.harvard.edu (Tom Ngo)
Newsgroups: comp.std.c++
Subject: What is int &volatile r; [Was: What is int &const r;]
Message-ID: <NGO.91Apr17224214@tammy.harvard.edu>
Date: 18 Apr 91 02:42:14 GMT
Sender: news@husc6.harvard.edu
Distribution: comp
Organization: Harvard Chemistry Department
Lines: 20