Article View: comp.std.c++
Article #2367Re: class member: static name const; Legal?
From: Don &
Date: Tue, 31 Oct 1995 19:28
Date: Tue, 31 Oct 1995 19:28
24 lines
1739 bytes
1739 bytes
>>>>> "Jason" == Jason Merrill <jason@cygnus.com> writes:
In article <u9n3ainrii.fsf@yorick.cygnus.com> jason@cygnus.com (Jason Merrill) writes:
>>>>> Bret Pehrson <BretP@strata3d.com> writes:
>> Is the following legal?
>> class base { static funkie(void) const; };
Jason> Nope; the 'const' qualifier affects the 'this' parameter to
Jason> a member function, so applying it to a static member
Jason> function is meaningless.
Thanks Jason, I've wondered about that too. If you can't mix
static and const, what way do we have of promising that a static
member function will not alter static data? If there is no
way at the moment, perhaps the standard should provide one.
Don Bashford
bashford@scripps.edu
[ 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:
<BASHFORD.95Oct31105612@toad.scripps.edu>Path:
arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamageReferences:
<4733v8$278@stellar.comnet.com> <u9n3ainrii.fsf@yorick.cygnus.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage From: bashford@scripps.edu (Don &) Newsgroups: comp.std.c++ Subject: Re: class member: static name const; Legal? Date: 31 Oct 1995 19:28:08 GMT Organization: The Scripps Research Institute, La Jolla, CA, USA Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <BASHFORD.95Oct31105612@toad.scripps.edu> References: <4733v8$278@stellar.comnet.com> <u9n3ainrii.fsf@yorick.cygnus.com> NNTP-Posting-Host: taumet.eng.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; conversions="7bit" Content-Transfer-Encoding: 7bit X-Nntp-Posting-Host: toad.scripps.edu In-Reply-To: jason@cygnus.com's message of 31 Oct 95 05:54:27 GMT X-Lines: 20 Content-Length: 732 Originator: clamage@taumet