Article View: comp.std.c++
Article #1509Re: operator[](int,int)
From: J. Kanze
Date: Fri, 28 Jul 1995 16:22
Date: Fri, 28 Jul 1995 16:22
30 lines
1837 bytes
1837 bytes
Anil Vijendran (s5vijen@portland.watson.ibm.com) wrote:
|> >>>>> On Mon, 24 Jul 1995 16:12:58 GMT, fjh@munta.cs.mu.OZ.AU (Fergus
|> Henderson) said:
|> [deleted]
|> Fergus> But no standard-conforming code defines `operator[] (int, int)'.
|> Fergus> If Borland makes `a[ x, y ]' call `operator[] (int, int)' in
|> Fergus> the case that `a' has an `operator[] (int, int)', it won't
|> Fergus> affect any standard-conforming code.
|> But what if `a' has an operator[](int) too? In that case, code like
|> a[x, y] which would resolve to operator[](int) by the standard, should
|> be ambiguous. I assume Borland would spew an ambiguity diagnostic,
|> shouldn't it?
It's really up to Borland to decide what to do in this case. Once you
are using an extension, you cannot argue about what the standard says.
|> In a sense it does break some code... the users of the class that
|> defines the non-standard operator[](int, int) and the standard
|> operator[](int, int).
Except that such code cannot legally exist, since there is no standard
operator[]( int , int ).
--
James Kanze (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
Conseils en informatique industrielle--
--Beratung in industrieller Datenverarbeitung
Technical Details
Message-ID:
<3vb2rm$1tk@gabi.gabi-soft.fr>Path:
arc1-ca.pugleaf.net!gabi-soft.fr!not-for-mailReferences:
<Pine.SOL.3.90.950706113001.24539A-100000@rphc7> <S5VIJEN.95Jul25100509@portland.watson.ibm.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!gabi-soft.fr!not-for-mail From: kanze@gabi-soft.fr (J. Kanze) Newsgroups: comp.std.c++ Subject: Re: operator[](int,int) Date: 28 Jul 1995 18:22:14 +0200 Organization: GABI Software, Sarl. Distribution: world Message-ID: <3vb2rm$1tk@gabi.gabi-soft.fr> References: <Pine.SOL.3.90.950706113001.24539A-100000@rphc7> <S5VIJEN.95Jul25100509@portland.watson.ibm.com> NNTP-Posting-Host: gabi.gabi-soft.fr X-Newsreader: TIN [version 1.2 PL2]