220 27151 <9e604034-9361-448a-a07f-04d0e61b4829@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Barry Revzin <barry.revzin@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: operator.() (R3) with deleted copy constructor
Date: Sun, 17 Jul 2016 20:57:40 -0700 (PDT)
Lines: 136
Approved: news@gmane.org
Message-ID: <9e604034-9361-448a-a07f-04d0e61b4829@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1411_1403896651.1468814260132"
X-Trace: ger.gmane.org 1468814270 7229 80.91.229.3 (18 Jul 2016 03:57:50 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 18 Jul 2016 03:57:50 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCJJTG7CS4ARBNNHWG6AKGQE7NKEV3A@isocpp.org Mon Jul 18 05:57:45 2016
Return-path: <std-proposals+bncBCJJTG7CS4ARBNNHWG6AKGQE7NKEV3A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f70.google.com ([209.85.214.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCJJTG7CS4ARBNNHWG6AKGQE7NKEV3A@isocpp.org>)
	id 1bOzgd-0000tr-94
	for gclcip-std-proposals@m.gmane.org; Mon, 18 Jul 2016 05:57:43 +0200
Original-Received: by mail-it0-f70.google.com with SMTP id i64sf175353980ith.2
        for <gclcip-std-proposals@m.gmane.org>; Sun, 17 Jul 2016 20:57:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=XGkBEeWsqx9ZMFvN1YI4Oz/BZWCIAXmg4WC9o7SGT5s=;
        b=XUeACxUe5/qCucMf9UCGv418U8lkrZdu2pS5Gz8q1DCAHpRsDA6Lav+ngxJaoEhTlc
         si/X5rAGLGGCxQgWbKVLdHbfeZe9Rh10hzN+nvLKVimL3nilrcq5cbD04oxgcCR/oXhw
         VVe8ZeDARhA7airlPWuvp7MfLzQwstisBYODbxgc2Uf7PTBM54fiDqgxB9drRkYF+3Sj
         GWDjD48WAItkK0UMdoYn5MvCsBpXlUP+J2Yika280MfTbWgTnE31YAQL/rg2SvBK+t2/
         SB2R2h+T7IkEkKTuxEK8qnQozYtcDqLdU+R14k4tkdhOmh/acnnES7t+sh5qxs0rsMRO
         nMIg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=XGkBEeWsqx9ZMFvN1YI4Oz/BZWCIAXmg4WC9o7SGT5s=;
        b=I0eQj5OYAlUFKHpupEgCZltLMzLB4q8ZlgaSPAuWZBHtXahwB14F9bonw5jql0eMdY
         v1M8urq2WSIsQzs1fsOz5psoRX0P6+06GK20b5+cfXisQ/wytI7yOzuPGMAn/Xk8nOEr
         ydBN1U4Ef4LRJcwJlZLQQ8QlZaTEAkZ95o8b4CnJTw/mXH9pRX/aRehbwHTOD3uPv9Gl
         g1k/x+o+mDC3db0M7F/Fc7myuyZJyyehRRD5h4piXxh/QH+s8UU7EOGXOQwS0snvlZ6B
         v5ol5gymB2dOEuI9/qZ049/bz+HqpoAQ9RGnwacLymOuWON5CB3gD13oE7uP1EV/zVyw
         xUXQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=XGkBEeWsqx9ZMFvN1YI4Oz/BZWCIAXmg4WC9o7SGT5s=;
        b=DAGTNX12RMBPJQcegeaWFLFJ5EKFGNIpUny8gDMi7Q+49y5fiQJdZsbPUe17xVvgH4
         6wU0JoN++vo3PNt63/lLlwaVDToTQf0zgvRb8SKa3k9kkTExYuUQ1DW0og+OiqTmTCYl
         MEG3NVnaGOqnq204yPJXNEE8wq4ltkT0Yp9Q3GFB9IggtSfJjxyg1v4NYu+gf1ZXHOKy
         SVy0tFxaBnD0KsVpYW3AMPTCcWy3B0AhAAOrwQIyfVQGqBLVK0jiPrJToC6s/MFZlzAx
         eH31XiKFXQ0XU3B7th9EZyttWg5s9aNlVMxCxz1yp9jhTFGplQb0h/cv9wMcbApOb+B9
         ivoQ==
X-Gm-Message-State: ALyK8tKTutDPVC5PRHFTYR1m5Xh6WTasH0Wl7181UmAyCMrqAKGA12WqAcfYJIZn9eCTSg==
X-Received: by 10.157.45.227 with SMTP id g90mr24543902otb.1.1468814261977;
        Sun, 17 Jul 2016 20:57:41 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.67.208 with SMTP id s199ls2636868itb.1.gmail; Sun, 17 Jul
 2016 20:57:41 -0700 (PDT)
X-Received: by 10.36.123.135 with SMTP id q129mr373069itc.1.1468814261046;
        Sun, 17 Jul 2016 20:57:41 -0700 (PDT)
X-Original-Sender: Barry.Revzin@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:27151
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/27151>

------=_Part_1411_1403896651.1468814260132
Content-Type: multipart/alternative; 
	boundary="----=_Part_1412_1591829672.1468814260133"

------=_Part_1412_1591829672.1468814260133
Content-Type: text/plain; charset=UTF-8

There's an example in the new paper 
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0416r0.pdf, page 
11) that looks like this (reduced slightly ):

template <class T>
class Ref2 {
public:
    Ref2(T& );
    Ref2(const Ref2& ) = delete;
    T& operator.();
};

void f(Ref2<X> rr);

X x;
Ref2<X> r{x};

f(r);// OK: no copy constructor, but r.operator.() is an X so 
f(X{r.operator.()})

There's no wording paper yet, so maybe this is premature, but I wanted to 
ask what the intended changes to the conversion sequence rules would be 
that would allow this to happen? 

-- 
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 email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9e604034-9361-448a-a07f-04d0e61b4829%40isocpp.org.

------=_Part_1412_1591829672.1468814260133
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">There&#39;s an example in the new paper (http://www.open-s=
td.org/jtc1/sc22/wg21/docs/papers/2016/p0416r0.pdf, page 11) that looks lik=
e this (reduced slightly ):<div><br></div><div><div class=3D"prettyprint" s=
tyle=3D"border: 1px solid rgb(187, 187, 187); word-wrap: break-word; backgr=
ound-color: rgb(250, 250, 250);"><code class=3D"prettyprint"><div class=3D"=
subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-prettify">t=
emplate</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">class</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> T</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">class</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"st=
yled-by-prettify">Ref2</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">public</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span>=
<span style=3D"color: #606;" class=3D"styled-by-prettify">Ref2</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify">T</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">);</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #606;" class=3D"=
styled-by-prettify">Ref2</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">const</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 </span><span style=3D"color: #606;" class=3D"styled-by-prettify">Ref2</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">&amp;</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">delete</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"><br>=C2=A0 =C2=A0 T</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">&amp;</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">ope=
rator</span><span style=3D"color: #660;" class=3D"styled-by-prettify">.();<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">};</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"><br><br></span><span styl=
e=3D"color: #008;" class=3D"styled-by-prettify">void</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> f</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">(</span><span style=3D"color: #606;" clas=
s=3D"styled-by-prettify">Ref2</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify">X</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> r=
r</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br>X x</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D=
"color: #606;" class=3D"styled-by-prettify">Ref2</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify">X</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> r</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
>x</span><span style=3D"color: #660;" class=3D"styled-by-prettify">};</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br>f</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><font col=
or=3D"#000000"><span style=3D"color: #000;" class=3D"styled-by-prettify">r<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><s=
pan style=3D"color: #800;" class=3D"styled-by-prettify">// OK: no copy cons=
tructor, but r.operator.() is an X so f(X{r.operator.()})</span></font></di=
v></code></div></div><div><br></div><div>There&#39;s no wording paper yet, =
so maybe this is premature, but I wanted to ask what the intended changes t=
o the conversion sequence rules would be that would allow this to happen?=
=C2=A0</div></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/9e604034-9361-448a-a07f-04d0e61b4829%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9e604034-9361-448a-a07f-04d0e61b4829=
%40isocpp.org</a>.<br />

------=_Part_1412_1591829672.1468814260133--

------=_Part_1411_1403896651.1468814260132--

.
