numeric Overloading [] for multiple subscripts in C++
dhoughadgh.Eng.Sun.COM
dhoughadgh.Eng.Sun.COM
Fri Jun 1 16:24:10 PDT 2001
Received via Jim Thomas:
Date: Wed, 30 May 2001 10:09:09 -0700
To: jimthomasacup.hp.com
From: Bill Gibbons <billagibbons.org>
Subject: Overloading [] for multiple subscripts in C++
The C++ committee is currently discussing changing the rules for overloading
"operator []" so that you could use multiple subscripts.
Currently allowed: only one subscript, e.g.
class A {
int operator[](int n);
};
A a;
...... a[i] calls the function "A::operator[]"
Proposed: allow more than one subscript, e.g.
class A {
int operator[](int x, y, z);
};
A a;
...... a[i,j,k] calls the function "A::operator[]"
I think this would be of great benefit to the numerical community.
Unfortunately, there is very little representation of the numerical
community on the C++ committee.
Would you like to comment on this issue for WG21/J16, or pass this on
to someone who you think would like to give some input?
I've been championing the issue so far (after someone else brought
it up), but it would help to get some outside feedback.
Thanks,
-- Bill Gibbons
More information about the Numeric-interest
mailing list