220 18012 <5E7FEC96-7F6B-4B2B-A165-C56F9E80C87E@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: First draft: Non-copyable call wrapper, std::unique_function
Date: Wed, 20 May 2015 09:26:53 +0800
Lines: 79
Approved: news@gmane.org
Message-ID: <5E7FEC96-7F6B-4B2B-A165-C56F9E80C87E@gmail.com>
References: <59ED9069-2650-44E2-B00E-0E56ED37B83D@gmail.com> <27a788e7-4912-4a58-8201-79138ddf15a3@isocpp.org> <CAGg_6+P=2BDzGGugjdAx1pKsAHxuxNyEXGi3rz-CA-st32mf0Q@mail.gmail.com>
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=_61F33E0D-EDFD-4798-BD88-4364CDD98D1F"
X-Trace: ger.gmane.org 1432085228 824 80.91.229.3 (20 May 2015 01:27:08 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 20 May 2015 01:27:08 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRBZOF56VAKGQEDNIXIGQ@isocpp.org Wed May 20 03:27:04 2015
Return-path: <std-proposals+bncBCW25A7E3QCRBZOF56VAKGQEDNIXIGQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ig0-f198.google.com ([209.85.213.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRBZOF56VAKGQEDNIXIGQ@isocpp.org>)
	id 1Yusmk-0000RD-UI
	for gclcip-std-proposals@m.gmane.org; Wed, 20 May 2015 03:27:03 +0200
Original-Received: by igbso2 with SMTP id so2sf60320435igb.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 19 May 2015 18:27:02 -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=2L/7IROAjXIzNx0aEHHm3yT0xH2GhNqoq0d7zNr92R4=;
        b=FBjD797C1AOf+TL7brTlDkhufYmS1YT+Ozs44Cav33lfXpScEVyK1iSfOX6A8MASG3
         t8npyjGx2X0LD+EkYwJ1N3/L0P9dxa3QOavMHHSW5cZ10Bu8KmEMC+RDWPaE62siF4gH
         NyqIXnQKluEFB0jNai3C6BWLl6JWYd59haZsFQrYZWyran9XbA+t3lnjVq4/ydS41xLw
         e35vIY+0aKrOOZ96eGbimtwECXeAxjhAUOzj+am9aWlHZMqTSPGjK4uI9J9wrsz5JPkp
         O2FAbCaYIZAWyP57ABqIL3Qt6U9RxaQzJbgPVFHFYH8twE6Hy4OGVj4uZ4BLfV+r07eO
         JIUg==
X-Gm-Message-State: ALoCoQlKvMUr/hk71+HP2gGkhovZfC6CujgryZomfs840G6PiUJNY1TmjqdqYFzcyjpHyzYMaSur
X-Received: by 10.50.57.1 with SMTP id e1mr29247869igq.0.1432085222031;
        Tue, 19 May 2015 18:27:02 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.131.164 with SMTP id on4ls205042obb.13.gmail; Tue, 19 May
 2015 18:27:01 -0700 (PDT)
X-Received: by 10.182.24.5 with SMTP id q5mr16382149obf.8.1432085221216;
        Tue, 19 May 2015 18:27:01 -0700 (PDT)
Original-Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com. [2607:f8b0:4003:c06::230])
        by mx.google.com with ESMTPS id nq4si827742oeb.18.2015.05.19.18.27.01
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 19 May 2015 18:27:01 -0700 (PDT)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:4003:c06::230 as permitted sender) client-ip=2607:f8b0:4003:c06::230;
Original-Received: by oign205 with SMTP id n205so24911290oig.2
        for <std-proposals@isocpp.org>; Tue, 19 May 2015 18:27:00 -0700 (PDT)
X-Received: by 10.202.67.10 with SMTP id q10mr2525268oia.124.1432085220852;
        Tue, 19 May 2015 18:27:00 -0700 (PDT)
Original-Received: from [172.20.10.2] ([121.54.44.91])
        by mx.google.com with ESMTPSA id xp8sm7610530obc.10.2015.05.19.18.26.57
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 19 May 2015 18:26:59 -0700 (PDT)
In-Reply-To: <CAGg_6+P=2BDzGGugjdAx1pKsAHxuxNyEXGi3rz-CA-st32mf0Q@mail.gmail.com>
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:4003:c06::230 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:18012
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/18012>

--Apple-Mail=_61F33E0D-EDFD-4798-BD88-4364CDD98D1F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9305=E2=80=9320, at 1:49 AM, Nevin Liber <nevin@eviloverlor=
d.com <mailto:nevin@eviloverlord.com>> wrote:
>=20
> Can't you always make unique_any moveable, given that it can allocate in =
the heap?

unique_any is not proposed here, only mentioned in =E2=80=9Cfuture directio=
ns.=E2=80=9D

> Also, consider making unique_function(unique_function&&) noexcept.

The noexcept qualification of unique_function is the same as for function. =
Both allow exceptions to propagate from the move constructor when the small=
 function optimization is applied. It=E2=80=99s a rare corner case, but the=
re=E2=80=99s no static information to make any guarantee.

--=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=_61F33E0D-EDFD-4798-BD88-4364CDD98D1F
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"><meta http-equiv=3D"Content-Type" content=3D"text/html charset=3D=
utf-8"><meta http-equiv=3D"Content-Type" content=3D"text/html charset=3Dutf=
-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space;" class=3D""><br class=3D""><div clas=
s=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=
=9305=E2=80=9320, at 1:49 AM, Nevin Liber &lt;<a href=3D"mailto:nevin@evilo=
verlord.com" class=3D"">nevin@eviloverlord.com</a>&gt; wrote:</div><br clas=
s=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" class=3D""=
><div class=3D"gmail_extra"><div class=3D"gmail_quote"><div class=3D"">Can'=
t you always make unique_any moveable, given that it can allocate in the he=
ap?</div><div class=3D""></div></div></div></div></div></blockquote><div cl=
ass=3D""><br class=3D""></div><div class=3D""><font face=3D"Courier" class=
=3D"">unique_any</font> is not proposed here, only mentioned in =E2=80=9Cfu=
ture directions.=E2=80=9D</div><br class=3D""><blockquote type=3D"cite" cla=
ss=3D""><div class=3D""><div dir=3D"ltr" class=3D""><div class=3D"gmail_ext=
ra"><div class=3D"gmail_quote"><div class=3D"">Also, consider making unique=
_function(unique_function&amp;&amp;) noexcept.</div></div></div></div></div=
></blockquote><br class=3D""></div><div class=3D"">The noexcept qualificati=
on of <font face=3D"Courier" class=3D"">unique_function</font> is the same =
as for <font face=3D"Courier" class=3D"">function</font>. Both allow except=
ions to propagate from the move constructor when the small function optimiz=
ation is applied. It=E2=80=99s a rare corner case, but there=E2=80=99s no s=
tatic information to make any guarantee.</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=_61F33E0D-EDFD-4798-BD88-4364CDD98D1F--

.
