220 17599 <D3FB0380-7DE1-42D7-BEED-F149F83E590B@gmail.com> article
Path: news.gmane.org!not-for-mail
From: David Krauss <potswa@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Thoughts/idea about N4401 vs N4475 (regarding raw
 ptrs and mutables)
Date: Thu, 30 Apr 2015 09:17:59 +0800
Lines: 91
Approved: news@gmane.org
Message-ID: <D3FB0380-7DE1-42D7-BEED-F149F83E590B@gmail.com>
References: <5c67669c-7812-43a5-a8fd-21dcc6f8894a@isocpp.org> <bf171353-43b7-4524-87af-fa995f763b5a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\))
Content-Type: multipart/alternative; boundary="Apple-Mail=_429D5339-73A8-4AC8-AB6D-7938F9F6D1C1"
X-Trace: ger.gmane.org 1430356698 20324 80.91.229.3 (30 Apr 2015 01:18:18 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 30 Apr 2015 01:18:18 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBUUFQ2VAKGQEMMCS6KQ@isocpp.org Thu Apr 30 03:18:13 2015
Return-path: <std-proposals+bncBCW25A7E3QCRBUUFQ2VAKGQEMMCS6KQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f200.google.com ([209.85.214.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBUUFQ2VAKGQEMMCS6KQ@isocpp.org>)
	id 1Ynd7E-0003rO-1g
	for gclcip-std-proposals@m.gmane.org; Thu, 30 Apr 2015 03:18:12 +0200
Original-Received: by obfe9 with SMTP id e9sf50878641obf.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 29 Apr 2015 18:18:10 -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:content-type:message-id:mime-version
         :subject:date:references:to:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=g9ZUp02FsVtojT/i6jRG64GIt+7UgVzri+qkOTMf2vQ=;
        b=jE15RoT6I6ZHJfXlxCX2t61x8GNQERaWj4FMO0DHPTlMmb0CH2c71lT9D+XumWsaMm
         6OW93CtJTIupQVuRz4n3HUblwSYKVb+upJT9JZwYooTGPXJGdcK5SXL41MkWssj8wCpp
         gC1DZyGqTvGvRmuBD7LuuB/9vGkzRTkl6MrWO54zP+Yaq9PGstKmGFNODq6M50jMHeCH
         AvGnMASabAWrjkjwzDXP/0ZGMhOinzaxK04Qmb3ctQwiVrM8dupgfe5+W4qvt2KoQr2L
         9ms3/KOE/RNuc4WhqANvY+F/mRmCYNPrEHThjRKiuwk+qVjwhbVJ6sQx6kjECXZx+r2C
         2/qA==
X-Gm-Message-State: ALoCoQl3AxX86qaofJhCJmPdRwp/WChBXfdEygsAJn7fVf1UjaagI+TGY/LnDia7iIP/SYJsx7ow
X-Received: by 10.182.22.138 with SMTP id d10mr2843342obf.37.1430356690608;
        Wed, 29 Apr 2015 18:18:10 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.79.131 with SMTP id j3ls6623igx.38.canary; Wed, 29 Apr 2015
 18:18:09 -0700 (PDT)
X-Received: by 10.70.54.164 with SMTP id k4mr3368438pdp.61.1430356689852;
        Wed, 29 Apr 2015 18:18:09 -0700 (PDT)
Original-Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com. [2607:f8b0:400e:c03::22f])
        by mx.google.com with ESMTPS id xg2si1059342pbb.106.2015.04.29.18.18.09
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 29 Apr 2015 18:18:09 -0700 (PDT)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:400e:c03::22f as permitted sender) client-ip=2607:f8b0:400e:c03::22f;
Original-Received: by pabsx10 with SMTP id sx10so43686490pab.3
        for <std-proposals@isocpp.org>; Wed, 29 Apr 2015 18:18:09 -0700 (PDT)
X-Received: by 10.66.231.42 with SMTP id td10mr3351530pac.98.1430356689565;
        Wed, 29 Apr 2015 18:18:09 -0700 (PDT)
Original-Received: from [172.20.10.2] ([121.54.44.89])
        by mx.google.com with ESMTPSA id zf1sm395515pbc.43.2015.04.29.18.18.05
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 29 Apr 2015 18:18:08 -0700 (PDT)
In-Reply-To: <bf171353-43b7-4524-87af-fa995f763b5a@isocpp.org>
X-Mailer: Apple Mail (2.2098)
X-Original-Sender: potswa@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of potswa@gmail.com designates 2607:f8b0:400e:c03::22f as permitted
 sender) smtp.mail=potswa@gmail.com;       dkim=pass header.i=@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
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:17599
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/17599>

--Apple-Mail=_429D5339-73A8-4AC8-AB6D-7938F9F6D1C1
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9304=E2=80=9329, at 5:56 PM, lie4pan1 <lie4pan1@gmail.com> =
wrote:
>=20
> After some thoughts I think any '__cookie__' non-mutable members should s=
uppress generating such said defaulted operators

What=E2=80=99s the point of declaring a __cookie__ when you can just declar=
e the operator as deleted? If we treat all pointers as implicitly __cookie_=
_, your position maps to the status quo, except that mutable members can be=
 included, which is a very niche case.

N4475 already notes the ambiguity around mutable members. Oddly it overlook=
s the alternative of letting them suppress the implicit declaration, but le=
aving the implicit definition available by =3D default. That=E2=80=99s what=
 I would favor.

Letting a mutable member participate in operator =3D=3D sounds like bad des=
ign. If you really want that, and there are lots of members, you can factor=
 the mutable and non-mutable members into two base classes, and then a deri=
ved class can compose its operator from from the base class implicit defini=
tions.

--=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/.

--Apple-Mail=_429D5339-73A8-4AC8-AB6D-7938F9F6D1C1
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9304=
=E2=80=9329, at 5:56 PM, lie4pan1 &lt;<a href=3D"mailto:lie4pan1@gmail.com"=
 class=3D"">lie4pan1@gmail.com</a>&gt; wrote:</div><br class=3D"Apple-inter=
change-newline"><div class=3D""><span style=3D"font-family: Helvetica; font=
-size: 12px; font-style: normal; font-variant: normal; font-weight: normal;=
 letter-spacing: normal; line-height: normal; orphans: auto; text-align: st=
art; text-indent: 0px; text-transform: none; white-space: normal; widows: a=
uto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; displa=
y: inline !important;" class=3D"">After some thoughts I think any '__cookie=
__' non-mutable members should suppress generating such said defaulted oper=
ators</span></div></blockquote></div><br class=3D""><div class=3D"">What=E2=
=80=99s the point of declaring a <font face=3D"Courier" class=3D"">__cookie=
__</font> when you can just declare the operator as deleted?&nbsp;If we tre=
at all pointers as implicitly&nbsp;<span style=3D"font-family: Courier;" cl=
ass=3D"">__cookie__</span>, your position maps to the status quo, except th=
at mutable members can be included, which is a very niche case.</div><div c=
lass=3D""><br class=3D""></div><div class=3D"">N4475 already notes the ambi=
guity around mutable members. Oddly it overlooks the alternative of letting=
 them suppress the implicit declaration, but leaving the implicit definitio=
n available by <font face=3D"Courier" class=3D"">=3D default</font>. That=
=E2=80=99s what I would favor.</div><div class=3D""><br class=3D""></div><d=
iv class=3D"">Letting a mutable member participate in <font face=3D"Courier=
" class=3D"">operator =3D=3D</font> sounds like bad design. If you really w=
ant that, and there are lots of members, you can factor the mutable and non=
-mutable members into two base classes, and then a derived class can compos=
e its operator from from the base class implicit definitions.</div></body><=
/html>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_429D5339-73A8-4AC8-AB6D-7938F9F6D1C1--

.
