Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!samsung!dali.cs.montana.edu!milton!uw-beaver!entropy!dataio!bright From: bright@Data-IO.COM (Walter Bright) Newsgroups: comp.lang.c++ Subject: Re: const member functions: why bother the programmer? Message-ID: <2591@dataio.Data-IO.COM> Date: 25 Jul 90 18:18:54 GMT References: <2026@kulcs.kulcs.uucp> Organization: Data I/O Corporation; Redmond, WA Lines: 46 In article <2026@kulcs.kulcs.uucp> herman@kulcs.uucp (Herman Moons) writes: f(). Unfortunately, now the compiler optimizer must *assume* that the contents of x are changed. If I explicitly call x->C_f(), then the optimizer is guaranteed that the contents of x are unchanged by the call, leaving many optimization possibilities open.