Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.lang.c++ Subject: Re: Distinguishing lvalue/rvalue operator[] Message-ID: <71135@microsoft.UUCP> Date: 7 Mar 91 21:34:54 GMT References: <1991Mar3.202134.17812@mathcs.sjsu.edu> <1991Mar4.054915.19566@mathcs.sjsu.edu> <1991Mar5.021423.22117@world.std.com> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Organization: Microsoft Corp., Redmond WA Lines: 12 In article <1991Mar5.021423.22117@world.std.com> wmm@world.std.com (William M Miller) writes: |That means that |anything you want to do with the accessed array member, you must be able to |do with an object of class Access. If you want to use ++, you need an |Access::operator++(). If you want to do ".print()," as in your earlier |posting, you need an Access::print(). This logic would imply that when implementing a smart pointer class, one should also be forced to implement SmartPointer::print(). Fortunately, in C++ today, people implementing smart pointers are not forced to do so. I suggest that people implementing smart reference classes should also not be forced to do so.