220 13621 <7554381.hfZM27sNRA@tjmaciei-mobl4> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Allow multi-parameter overloads of operator[]
Date: Fri, 03 Oct 2014 07:50:01 -0700
Lines: 31
Approved: news@gmane.org
Message-ID: <7554381.hfZM27sNRA@tjmaciei-mobl4>
References: <bda05fc4-9da6-40d4-a493-f32c8046a916@isocpp.org> <c0e54b29-e4ae-448d-8671-e00cf5b31489@isocpp.org> <BLU436-SMTP187C6BD334CDBB629EDF05BA7A60@phx.gbl>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1412347819 5814 80.91.229.3 (3 Oct 2014 14:50:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 3 Oct 2014 14:50:19 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBJPPXKQQKGQETMJOYMI@isocpp.org Fri Oct 03 16:50:15 2014
Return-path: <std-proposals+bncBCB4TK757YBRBJPPXKQQKGQETMJOYMI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-la0-f69.google.com ([209.85.215.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBJPPXKQQKGQETMJOYMI@isocpp.org>)
	id 1Xa4BS-0006id-Bv
	for gclcip-std-proposals@m.gmane.org; Fri, 03 Oct 2014 16:50:14 +0200
Original-Received: by mail-la0-f69.google.com with SMTP id q1sf781964lam.8
        for <gclcip-std-proposals@m.gmane.org>; Fri, 03 Oct 2014 07:50:14 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-transfer-encoding:content-type;
        bh=DhmyyEKhMX5SFUhn4X9BA8dPeQQVg10jSGMU2MU+PBY=;
        b=NlOkf6uSrOiJYtbmhzgYNpB4K0RhYGvWBcBoOoVgpLNwl8vOXythvNh2aPEFYu0oJ1
         bkaYMhm1UVoBwbE4vmCBTKxJ8Fm0AIAJspA6p7gElRmbAhuY5J25u0J6qwmQaMk0JmWJ
         L97c9AlJSRZTrMJcGYTFywJr3UdLHWwGfFov3298kCXwblFlyJSmdpIQt1CYw2RYI3Tv
         WNoYUmwtzStHOKjYOiH1mUiqJeVML3CovNXMHatqtTIUCySNuDT8eGdLlIqqf8WQOkto
         9I0X4//kkAVBxlhHBY45KemvnP+a4wHsXRg1CUArv/5wA1rEB6KXr7eaXu97fVSZzc7a
         X9b 
X-Gm-Message-State: ALoCoQlXc/KCSfTwhMF72T6cqbYamKc5xnGorieJodfYIXTGtXSx3Tla3kKjGxb9CNWN1gVOGRjI
X-Received: by 10.194.63.206 with SMTP id i14mr573100wjs.5.1412347814138;
        Fri, 03 Oct 2014 07:50:14 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.206.103 with SMTP id ln7ls365639lac.36.gmail; Fri, 03 Oct
 2014 07:50:12 -0700 (PDT)
X-Received: by 10.112.145.100 with SMTP id st4mr6072106lbb.17.1412347812419;
        Fri, 03 Oct 2014 07:50:12 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id yg7si11436574lbb.133.2014.10.03.07.50.12
        for <std-proposals@isocpp.org>;
        Fri, 03 Oct 2014 07:50:12 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl4.localnet (jfdmzpr03-ext.jf.intel.com [134.134.139.72])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 2EEBF11BCFD
	for <std-proposals@isocpp.org>; Fri,  3 Oct 2014 07:50:10 -0700 (PDT)
User-Agent: KMail/4.14 (Linux/3.11.10-21-desktop; KDE/4.14.0; x86_64; ; )
In-Reply-To: <BLU436-SMTP187C6BD334CDBB629EDF05BA7A60@phx.gbl>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mail=thiago@macieira.org
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:13621
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13621>

On Friday 03 October 2014 11:07:12 Agust=EDn K-ballo Berg=E9 wrote:
> Until a proposal of the sort makes it into the language, consider the=20
> following alternative:
>=20
>      struct mda_index { std::size_t x; std::size_t y; };
>=20
>      struct multi_dim_array {
>        auto& operator[](mda_index i) const { /*...*/ }
>      };
>=20
>      multi_dim_array mda;
>      mda[{1, 5}] =3D 10;

Simpler: use operator().
--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

.
