🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Continue: static func() const; legal?

#2401
From: Ralph Shnelvar
Date: Thu, 02 Nov 1995 23:29
27 lines
1547 bytes
matt@cyclops5.berkeley.edu (Matt Austern) wrote:

>In article <478k57$5gl@stellar.comnet.com> Bret Pehrson
><BretP@strata3d.com> writes:
>
>There's no way to declare a function such that it's prohibited from
>modifying global variables; similarly, there's no way to declare a
>function such that it's prohibited from modifying static member
>variables.

That's a double pity.

First, it is a pity that one cannot declare a function and say "You
can't access global variables.

Second, it is a pity that class static variables cannot be defined as
untouchable.

Thanks for pointing this counter-intuitive use of
	function() const
out.  I actually had to run a test compilation to believe you.

Ralph
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <47bjhf$c1n@meg.tesser.com>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
References: <478k57$5gl@stellar.comnet.com> <MATT.95Nov1162611@cyclops5.berkeley.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 02 Nov 95 23:29:27 GMT
Approved: fjh@cs.mu.oz.au
From: ralphs@tesser.com (Ralph Shnelvar)
Newsgroups: comp.std.c++
Subject: Re: Continue:  static func() const;  legal?
X-Original-Date: Thu, 02 Nov 1995 23:11:02 GMT
Organization: Tesser, LLC
Message-ID: <47bjhf$c1n@meg.tesser.com>
References: <478k57$5gl@stellar.comnet.com> <MATT.95Nov1162611@cyclops5.berkeley.edu>
X-Newsreader: Forte Agent .99b.112
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMJlUf+EDnX0m9pzZAQFy7QF/b1LPE2hovMJztLcKjKdXbEFfPaYofSW0
 kmWLwDvw/Lkmqycnuk9416YcHy4d+EE/
 =joaB