220 20755 <36773CE4-9980-40C0-806A-05CA359D5599@gmail.com> article
Path: news.gmane.org!not-for-mail
From: David Krauss <potswa@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: =?UTF-8?Q?=5Bstd=2Dproposals=5D_Draft_D0045_=E2=80=94_Overloaded_and_quali?=
	=?UTF-8?Q?fied_std=3A=3Afunction?=
Date: Thu, 24 Sep 2015 16:55:02 +0800
Lines: 91
Approved: news@gmane.org
Message-ID: <36773CE4-9980-40C0-806A-05CA359D5599@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
Content-Type: multipart/alternative; boundary="Apple-Mail=_014124F4-2442-4E08-A70E-822E09691DAD"
X-Trace: ger.gmane.org 1443084928 19916 80.91.229.3 (24 Sep 2015 08:55:28 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 24 Sep 2015 08:55:28 +0000 (UTC)
Cc: Matt Calabrese <calabrese@google.com>,
 Geoffrey Romer <gromer@google.com>
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCW25A7E3QCRB3HUR2YAKGQEB22FMEI@isocpp.org Thu Sep 24 10:55:17 2015
Return-path: <std-proposals+bncBCW25A7E3QCRB3HUR2YAKGQEB22FMEI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f70.google.com ([209.85.220.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCW25A7E3QCRB3HUR2YAKGQEB22FMEI@isocpp.org>)
	id 1Zf2J9-0000QC-Ii
	for gclcip-std-proposals@m.gmane.org; Thu, 24 Sep 2015 10:55:15 +0200
Original-Received: by pacgz1 with SMTP id gz1sf113094925pac.0
        for <gclcip-std-proposals@m.gmane.org>; Thu, 24 Sep 2015 01:55:09 -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:subject:date:message-id:cc:to
         :mime-version: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=OgpdDNrihEyNYD5//vivtn1rLPm1tOS0/u40zpJzuWc=;
        b=c3MeOQICPOSE83sqrBa4KzvF8NkxtsrAo6Mh1N2hjE0pi9njC8HwXiuvBZebru09HA
         75feKPk6VUjcbI4IDIHawXw9sYZJKcbfkLl55+gD9rl5HRd/q0ZNjiQB9kMXYVTGcyXh
         4IveX6Hc5V1y/HRTH89wm9WqvxAVNx3Y7X7OEqUzdciwvrCwr8d4NvqUBqv2BB3i3RnN
         bPZdAtSaGcF265WLFjvZACAcMapgDG2/09LoE58bS6t04y3i4BygS7oARVxebFwiDX3C
         fe5cZwskjij8CzItayWhTJGW358WSjIRP2rYPZDjqGqQ1ONhBzivYcjpgXloBeIp5+x5
         CWiQ==
X-Gm-Message-State: ALoCoQm6IiYaF2bbTkJU9QWxHWqCY97XktqR019CCAi11260PonNFHf6J9PCF+D39fgk8/QuqPqz
X-Received: by 10.66.100.233 with SMTP id fb9mr30756453pab.24.1443084909371;
        Thu, 24 Sep 2015 01:55:09 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.136.210 with SMTP id s79ls664057ioi.76.gmail; Thu, 24 Sep
 2015 01:55:08 -0700 (PDT)
X-Received: by 10.107.170.32 with SMTP id t32mr44277508ioe.173.1443084908558;
        Thu, 24 Sep 2015 01:55:08 -0700 (PDT)
Original-Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com. [2607:f8b0:400e:c03::236])
        by mx.google.com with ESMTPS id z14si124391igp.63.2015.09.24.01.55.08
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 24 Sep 2015 01:55:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of potswa@gmail.com designates 2607:f8b0:400e:c03::236 as permitted sender) client-ip=2607:f8b0:400e:c03::236;
Original-Received: by padhy16 with SMTP id hy16so67440470pad.1
        for <std-proposals@isocpp.org>; Thu, 24 Sep 2015 01:55:08 -0700 (PDT)
X-Received: by 10.68.176.227 with SMTP id cl3mr43349962pbc.8.1443084908226;
        Thu, 24 Sep 2015 01:55:08 -0700 (PDT)
Original-Received: from [172.20.10.2] ([121.54.54.187])
        by smtp.gmail.com with ESMTPSA id bz1sm12370650pad.36.2015.09.24.01.55.06
        (version=TLSv1/SSLv3 cipher=OTHER);
        Thu, 24 Sep 2015 01:55:07 -0700 (PDT)
X-Mailer: Apple Mail (2.2104)
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::236 as permitted
 sender) smtp.mailfrom=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-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:20755
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/20755>

--Apple-Mail=_014124F4-2442-4E08-A70E-822E09691DAD
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8

Another day, another draft. This is my fourth std::function-related proposa=
l for Kona, and I saved the best for last.

Abstract:
std::function supports exactly one function signature at a time. Multiple, =
overloaded signatures have many uses: exposing several functionalities of a=
 class, accessing data within the target object, discriminating between acc=
ess as const, non-const, rvalue, lvalue, etc. Several third-party libraries=
 address the niche, but the role of const is controversial and ref-qualifie=
rs receive little attention. This proposal replaces std::function<R(P...)> =
with std::function<Sig...>, where Sig is any type allowed for member functi=
ons. The const dilemma is resolved without breakage. A quality prototype im=
plementation is provided.

PDF: bit.ly/qofun <http://bit.ly/qofun>
Implementation: https://github.com/potswa/cxx_function <https://github.com/=
potswa/cxx_function>

--=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=_014124F4-2442-4E08-A70E-822E09691DAD
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=
=3Dus-ascii"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode=
: space; -webkit-line-break: after-white-space;" class=3D"">Another day, an=
other draft. This is my fourth&nbsp;<font face=3D"Courier" class=3D"">std::=
function</font>-related proposal for Kona, and I saved the best for last.<d=
iv class=3D""><br class=3D""></div><div class=3D"">Abstract:</div><div clas=
s=3D""><p style=3D"margin: 0px 0px 16px; font-family: Times; -webkit-text-s=
troke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; font-size: 1=
3px;" class=3D""><span style=3D"font-size: 12px; font-family: Courier; back=
ground-color: rgb(245, 245, 245);" class=3D"">std::function</span> supports=
 exactly one function signature at a time. Multiple, overloaded signatures =
have many uses: exposing several functionalities of a class, accessing data=
 within the target object, discriminating between access as <span style=3D"=
font-size: 12px; font-family: Courier; background-color: rgb(245, 245, 245)=
;" class=3D"">const</span>, non-<span style=3D"font-size: 12px; font-family=
: Courier; background-color: rgb(245, 245, 245);" class=3D"">const</span>, =
rvalue, lvalue, etc. Several third-party libraries address the niche, but t=
he role of <span style=3D"font-size: 12px; font-family: Courier; background=
-color: rgb(245, 245, 245);" class=3D"">const</span> is controversial and <=
i class=3D"">ref-qualifiers</i> receive little attention. This proposal rep=
laces <span style=3D"font-size: 12px; font-family: Courier; background-colo=
r: rgb(245, 245, 245);" class=3D"">std::function&lt;R(P...)&gt;</span> with=
 <span style=3D"font-size: 12px; font-family: Courier; background-color: rg=
b(245, 245, 245);" class=3D"">std::function&lt;Sig...&gt;</span>, where <sp=
an style=3D"font-size: 12px; font-family: Courier; background-color: rgb(24=
5, 245, 245);" class=3D"">Sig</span> is any type allowed for member functio=
ns. The <span style=3D"font-size: 12px; font-family: Courier; background-co=
lor: rgb(245, 245, 245);" class=3D"">const</span> dilemma is resolved witho=
ut breakage. A quality prototype implementation is provided.<span style=3D"=
font-size: 10px;" class=3D""><sup style=3D"font-size: 10px;" class=3D""></s=
up></span></p></div><div class=3D"">PDF: <a href=3D"http://bit.ly/qofun" cl=
ass=3D"">bit.ly/qofun</a></div><div class=3D"">Implementation:&nbsp;<a href=
=3D"https://github.com/potswa/cxx_function" class=3D"">https://github.com/p=
otswa/cxx_function</a></div><div class=3D""><br class=3D""></div></body></h=
tml>

<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=_014124F4-2442-4E08-A70E-822E09691DAD--

.
