Xref: utzoo comp.lang.c++:12139 comp.std.c++:718 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.lang.c++,comp.std.c++ Subject: Re: distinguishing operator[] on left and right Message-ID: <71122@microsoft.UUCP> Date: 7 Mar 91 19:55:56 GMT References: <1991Feb28.212419.20920@ndl.com> <1991Mar2.000705.3496@mathcs.sjsu.edu> <1991Mar2.212017.13885@world.std.com> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Organization: Microsoft Corp., Redmond WA Lines: 12 In article <1991Mar2.212017.13885@world.std.com> wmm@world.std.com (William M Miller) writes: |Another major consideration X3J16 applies to proposals is if there is a |straightforward way to achieve the desired results in the existing language. |As someone pointed out in an earlier posting, making operator[]() return an |object of an auxiliary class with separate operator=() and conversion |operator member functions is a pretty reasonable way to address this problem |where it's needed, and it's more generally applicable, as well. .... assuming that the committee accepts overloaded operator dot. Otherwise, as Cay has pointed out, making operator[] return an auxiliary class [ dare we call it a "reference" class ??? ] is not a general solution, since it cannot be dereferenced like a normal object.