220 5313 <7718970.fhFWpGWnh7@tjmaciei-mobl2> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Overloaded Declarators
Date: Sat, 06 Jul 2013 09:56:15 -0700
Lines: 64
Approved: news@gmane.org
Message-ID: <7718970.fhFWpGWnh7@tjmaciei-mobl2>
References: <82b89c5e-ce4e-49c0-82b2-d6032631e3e3@isocpp.org> <CAEn_SP+jA2r6OjupsbkBDQpuPxZTJP-HFtBp-XBasf+LuA8psA@mail.gmail.com> <3ab6aadf-3c8b-4054-87bb-9db8a786f847@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart4809131.u02t0EHU9j"; micalg="pgp-sha1"; protocol="application/pgp-signature"
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1373129785 20147 80.91.229.3 (6 Jul 2013 16:56:25 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 6 Jul 2013 16:56:25 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBOMY4GHAKGQEUVVOVJI@isocpp.org Sat Jul 06 18:56:27 2013
Return-path: <std-proposals+bncBCB4TK757YBRBOMY4GHAKGQEUVVOVJI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-fa0-f70.google.com ([209.85.161.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBOMY4GHAKGQEUVVOVJI@isocpp.org>)
	id 1UvVmd-0006cF-1i
	for gclcip-std-proposals@m.gmane.org; Sat, 06 Jul 2013 18:56:27 +0200
Original-Received: by mail-fa0-f70.google.com with SMTP id m1sf3574532fam.5
        for <gclcip-std-proposals@m.gmane.org>; Sat, 06 Jul 2013 09:56:26 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:from:to:subject:date:message-id:user-agent:in-reply-to
         :references:mime-version:content-type:content-transfer-encoding
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-google-group-id:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=E0Y7wshGywF74xQ4ymmsFUxoiIU0Sl1AYfYNBkitYyY=;
        b=dV8dBE+lqj+A5yQ2MwOkhJjR7YQxL4Y6Z3czXB5Z78c2gxnoysammy4hCEwIJj19So
         sLsJePTJfryp9CqrIJ4gWRBEl9m/Wc3wLpyEubwyShvzLzioTWufUF0KN8DLde6kdx0B
         DpqbKlFbb2DsAlU5lQXR6yKBlkY9uE6SYSm1AGyGAcS/2Bj2j/1o93wAs+fdfor8mFDQ
         lrk0VpE3hmJCG5hx7+VVcCjEy22pgrqKANzBRqpsiwUwbwoSWlgM7H/62OGtV59lNWcq
         /ynXBQecHJbVl2xisXL8N0/wj80bvD3F2RxNYcPW1NipH0E/lLX24Hj1BlqDpYiNfjTZ
 
X-Received: by 10.180.207.44 with SMTP id lt12mr4418083wic.5.1373129786690;
        Sat, 06 Jul 2013 09:56:26 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.36.77 with SMTP id o13ls772892wij.32.gmail; Sat, 06 Jul
 2013 09:56:25 -0700 (PDT)
X-Received: by 10.15.31.198 with SMTP id y46mr17442793eeu.135.1373129785274;
        Sat, 06 Jul 2013 09:56:25 -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 s8si10477126ees.88.2013.07.06.09.56.25
        for <std-proposals@isocpp.org>;
        Sat, 06 Jul 2013 09:56:25 -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-mobl2.localnet (c-76-105-211-168.hsd1.or.comcast.net [76.105.211.168])
	by gondolin.macieira.info (Postfix) with ESMTPSA id B7BAE11B0C5
	for <std-proposals@isocpp.org>; Sat,  6 Jul 2013 09:56:24 -0700 (PDT)
User-Agent: KMail/4.11 pre (Linux/3.7.9-104.fc17.x86_64; KDE/4.10.60; x86_64; git-07349df; 2013-02-16)
In-Reply-To: <3ab6aadf-3c8b-4054-87bb-9db8a786f847@isocpp.org>
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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:5313
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5313>


--nextPart4809131.u02t0EHU9j
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"

On s=E1bado, 6 de julho de 2013 00.23.02, andrewtomazos@gmail.com wrote=
:
> This is the same argument as existing overloaded operators.  You woul=
dn't=20
> argue that being able to define:
>=20
>     Bar operator+(Foo a, Foo b);
>=20
> affects existing code that expects the built-in meaning of 3 + 4.

That's exactly the point. It doesn't affect built-in meanings.

Without the operator+ definition above, (foo) + (foo) won't compile, so=
 there's=20
no problem in adding the overload. You're permitting code to work where=
 it=20
otherwise wouldn't. And overloading the unary operator& seems like a mi=
stake=20
to me, so I wouldn't count that as a good example to follow ("two wrong=
s don't=20
make a right").

On the other hand, your proposal does change built-in meaning (of somet=
hing=20
that is not an operator, by the way). The code
=09Foo *ptr;

already compiled and had a specific meaning. You want to change the mea=
ning of=20
what it had.

And, like I said, it's not an operator, it's actually a language constr=
uct.=20
Unless you also want to support this:

=09template <class T>
=09using operator const<Foo> =3D Foo;

--=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

--nextPart4809131.u02t0EHU9j
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iD8DBQBR2Ew2M/XwBW70U1gRAlxEAJ98n7Uk6yNT+68D4sEQMY6CnkpszACgkLXF
9cb8WGBScwh1y8s6p/V1AmM=
=KMrA
-----END PGP SIGNATURE-----

--nextPart4809131.u02t0EHU9j--


.
