From 9078509450601905921
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,9a5d91576ea14293
X-Google-Attributes: gid109fba,public
X-Google-Thread: f78e5,42ca30940288d269
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1992-03-02 08:27:27 PST
Xref: sparky comp.lang.c++:5484 comp.std.c++:260
Newsgroups: comp.lang.c++,comp.std.c++
Path: sparky!uunet!wupost!rice!dougm
From: dougm@rice.edu (Doug Moore)
Subject: Re: X to the Y power, how?
Message-ID: <1992Mar2.154651.12261@rice.edu>
Originator: dougm@cs.rice.edu
Sender: news@rice.edu (News)
Reply-To: dougm@rice.edu (Doug Moore)
Organization: Rice University
References: <50175@hydra.gatech.EDU> <1992Feb27.135250.25403@ux1.cso.uiuc.edu> <1992Feb27.223558.276@rice.edu> <22292@alice.att.com> <omci1INN8np@agate.berkeley.edu> <9206222.13299@mulga.cs.mu.OZ.AU>
Date: Mon, 2 Mar 1992 15:46:51 GMT


In article <9206222.13299@mulga.cs.mu.OZ.AU>, fjh@magnum.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
|> ... I am SICK TO DEATH of the MANY people posting INCORRECT statements to
|> the effect that "well, using '**' would be nice, but it is impossible".
|> 
|> It is QUITE possible to provide a simple interface that allows ** to be used as
|> both for exponentiation and double-indirection.

Okay.  So, if I've overloaded both unary and binary operator * for a
class Foo, and I've overloaded the exponentiation operator ** as well,
what is the meaning of:

Foo a,b,c;
a = b**c;  // b * (*c)?   b (**) c?

Doug Moore
(dougm@cs.rice.edu)


