220 18771 <D35E5526-A032-4F0C-8CA4-B51687664384@me.com> article
Path: news.gmane.org!not-for-mail
From: David Krauss <david_work@me.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: First draft: Non-copyable call wrapper, std::unique_function
Date: Thu, 25 Jun 2015 15:51:01 +0800
Lines: 84
Approved: news@gmane.org
Message-ID: <D35E5526-A032-4F0C-8CA4-B51687664384@me.com>
References: <59ED9069-2650-44E2-B00E-0E56ED37B83D@gmail.com>
 <4f0124c9-aa8e-4d40-b10e-7b3bee362398@isocpp.org>
 <CANh8DEmzJTdTYJv7WPK=d4z__3bLdxGHJzAnr61cS83gvfJ9Hw@mail.gmail.com>
 <5dcf242c-aef0-4d0b-b2f7-45273968cba9@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=_A998E045-A328-4515-9406-1FE7D7FE2831"
X-Trace: ger.gmane.org 1435218679 4401 80.91.229.3 (25 Jun 2015 07:51:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 25 Jun 2015 07:51:19 +0000 (UTC)
Cc: std-proposals@isocpp.org
To: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
Original-X-From: std-proposals+bncBCW25A7E3QCRB2PFV2WAKGQE4FZQV5A@isocpp.org Thu Jun 25 09:51:10 2015
Return-path: <std-proposals+bncBCW25A7E3QCRB2PFV2WAKGQE4FZQV5A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ig0-f197.google.com ([209.85.213.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRB2PFV2WAKGQE4FZQV5A@isocpp.org>)
	id 1Z81wB-0005Nd-86
	for gclcip-std-proposals@m.gmane.org; Thu, 25 Jun 2015 09:51:07 +0200
Original-Received: by igbqq3 with SMTP id qq3sf118196429igb.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 25 Jun 2015 00:51:06 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:content-type:mime-version:subject:from
         :in-reply-to:date:cc:message-id:references:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=1qBTb8cgT8UTvBDs6OHMRSNq1P7bLXvrhanVkNFYFZs=;
        b=QIITia9/WyMlVkUEfmh1uVbfE3I2JAQkrvmrFRWc7hkeHU6naIuE9Iq5prbZw6Ci1D
         4gIeEjNfahJg1L37gRRdtOglN1h710PgRv+d6mROBaFAeH6qWDHNMv9SK0t4/v9P2g5j
         kvya0PsKK3kUm464+zWKJn2BxYfvXGBImiRW8mouvanMz024k2duqIiEtxSkz4r076iB
         cpm8aA0bOvT3eigRkbI10kr1Cdu953CH3ihh09kHp9KUFa9MBTA913GiCwnTiIUIMngp
         ZcWYuPS9lNS36HlXRjwwQzRcX1M3WXTjvtKt/x5a1yKre7qsRmefgjIVO3imSExgEtt8
         JWTw==
X-Gm-Message-State: ALoCoQloXN+qC9qENQ18438h+si/kR57A3PaUw04MdnXB78VisfnG47QlDzM07PKqkMQTFA9u6DD
X-Received: by 10.182.213.166 with SMTP id nt6mr62337456obc.3.1435218666055;
        Thu, 25 Jun 2015 00:51:06 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.169.168 with SMTP id f40ls793854ioj.37.gmail; Thu, 25 Jun
 2015 00:51:05 -0700 (PDT)
X-Received: by 10.70.38.170 with SMTP id h10mr87373108pdk.20.1435218665430;
        Thu, 25 Jun 2015 00:51:05 -0700 (PDT)
Original-Received: from nk11p04mm-asmtp002.mac.com (nk11p04mm-asmtp002.mac.com. [17.158.236.237])
        by mx.google.com with ESMTPS id qp11si43815624pdb.211.2015.06.25.00.51.05
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128);
        Thu, 25 Jun 2015 00:51:05 -0700 (PDT)
Received-SPF: pass (google.com: domain of david_work@me.com designates 17.158.236.237 as permitted sender) client-ip=17.158.236.237;
Original-Received: from [172.20.10.2] (unknown [121.54.44.90])
 by nk11p04mm-asmtp002.mac.com
 (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015))
 with ESMTPSA id <0NQH00LDPPT14800@nk11p04mm-asmtp002.mac.com> for
 std-proposals@isocpp.org; Thu, 25 Jun 2015 07:51:05 +0000 (GMT)
X-Proofpoint-Virus-Version: vendor=fsecure
 engine=2.50.10432:5.14.151,1.0.33,0.0.0000
 definitions=2015-06-25_03:2015-06-23,2015-06-25,1970-01-01 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0
 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1506250135
In-reply-to: <5dcf242c-aef0-4d0b-b2f7-45273968cba9@isocpp.org>
X-Mailer: Apple Mail (2.2098)
X-Original-Sender: david_work@me.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of david_work@me.com designates 17.158.236.237 as permitted sender)
 smtp.mail=david_work@me.com;       dmarc=pass (p=NONE dis=NONE) header.from=me.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: <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:18771
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/18771>

--Apple-Mail=_A998E045-A328-4515-9406-1FE7D7FE2831
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9306=E2=80=9325, at 3:03 PM, Arthur O'Dwyer <arthur.j.odwye=
r@gmail.com> wrote:
>=20
> David Krauss, as the author of N4543 (std::unique_function<R(A...)>), do =
you think it's in any way preferable to N4159 (std::function<R(A...)&&>), a=
s in,

I see the confusion now. These are orthogonal problems:

1. Can no more than one copy of the target exist? (Solution: unique_functio=
n.)=20
2. Can a given copy be called not more than once? (Solution: function<R(A..=
..)&&>.)

N4159 already explains this distinction, but the exposition might not be cl=
ear enough.

More depth is provided by the link at the end of the previous message. Most=
 of the time, rvalue ref-qualification is going to be a bit obscure (as it =
always has been), and unique_function is what you=E2=80=99ll be looking for=
..

--=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=_A998E045-A328-4515-9406-1FE7D7FE2831
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=9306=
=E2=80=9325, at 3:03 PM, Arthur O'Dwyer &lt;<a href=3D"mailto:arthur.j.odwy=
er@gmail.com" class=3D"">arthur.j.odwyer@gmail.com</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">David K=
rauss, as the author of N4543 (<font face=3D"courier new, monospace" class=
=3D"">std::unique_function&lt;R(A...)&gt;</font>), do you think it's in any=
 way <i class=3D"">preferable</i> to N4159 (<font face=3D"courier new, mono=
space" class=3D"">std::function&lt;R(A...)&amp;&amp;&gt;</font>), as in,</d=
iv></div></blockquote><div><br class=3D""></div><div>I see the confusion no=
w. These are orthogonal problems:</div><div><br class=3D""></div><div>1. Ca=
n no more than one copy of the target exist? (Solution: <font face=3D"Couri=
er" class=3D"">unique_function</font>.)&nbsp;</div><div>2. Can a given copy=
 be called not more than once? (Solution: <font face=3D"Courier" class=3D""=
>function&lt;R(A...)&amp;&amp;&gt;</font>.)</div><div><br class=3D""></div>=
<div>N4159 already explains this distinction, but the exposition might not =
be clear enough.</div><div><br class=3D""></div><div>More depth is provided=
 by the link at the end of the previous message. Most of the time, rvalue r=
ef-qualification is going to be a bit obscure (as it always has been), and =
<font face=3D"Courier" class=3D"">unique_function</font> is what you=E2=80=
=99ll be looking for.</div></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=_A998E045-A328-4515-9406-1FE7D7FE2831--

.
