Topic: [std-proposals] Draft D0045 Overloaded and quali
Author: David Krauss <potswa@gmail.com>
Date: Thu, 24 Sep 2015 16:55:02 +0800
Raw View
--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 <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<R(P...)></span> with=
<span style=3D"font-size: 12px; font-family: Courier; background-color: rg=
b(245, 245, 245);" class=3D"">std::function<Sig...></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: <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" 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--
.