Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!xanth!ames!amdahl!pacbell!hoptoad!hsfmsh!mhyman From: mhyman@hsfmsh.UUCP (Marco S. Hyman) Newsgroups: comp.lang.c++ Subject: Re: const member functions ? Summary: Supported in 2.0 Message-ID: <1065@hsfmsh.UUCP> Date: 18 Jul 89 15:59:15 GMT References: <6590205@hplsla.HP.COM> Reply-To: mhyman@hsfmsh.UUCP (Marco S. Hyman) Organization: SoftCom, Inc. San Francisco Lines: 20 In article <6590205@hplsla.HP.COM> jima@hplsla.HP.COM (Jim Adcock) writes: > Is there a way to declare a member function const -- IE to tell the compiler > that the member function does not change the value of this nor *this > > ??? Release 2.0 supports the following: (according to Lippman's book) class x { ... type func() const {...}; } I don't know if it's supported in G++ as I haven't tried it yet. --marc -- //Marco S. Hyman //UUCP: ...!sun!sfsun!hsfmsh!mhyman //Domain: sfsun!hsfmsh!mhyman@sun.com