Topic: [std-proposals] Draft D0043 Function wrappers wi
Author: David Krauss <potswa@gmail.com>
Date: Wed, 16 Sep 2015 16:00:43 +0800
Raw View
--Apple-Mail=_BE31E3FE-EFE9-44AA-998B-2BFC046B8422
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
Here=E2=80=99s another proposal. The goal is to keep std::function as well-=
behaved as it always has been, while also providing a means to precisely co=
ntrol its resource allocations. Hopefully this will be my most esoteric wri=
te-up for a while.
Abstract:
The Fundamentals TS v.1 introduces a new architecture for function, where i=
t enforces an allocation scheme on its target objects. Because move assignm=
ent reallocates the new value, it fails to provide a noexcept guarantee. It=
also may subtly introduce bugs and breakage. The status quo is more intuit=
ive, in terms of reference and value semantics. The new scheme also require=
s parallel type erasure of the allocator, costing memory and performance. T=
his proposal formalizes the current std::function model with only minor ext=
ensions, and introduces a new, interoperable but allocator-aware class func=
tion_container to enforce allocation guarantees. fundamentals_v1::function =
fits neatly into its container model. A complete, high-quality reference im=
plementation is provided.
PDF: bit.ly/allocfun <http://bit.ly/allocfun>
--=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=_BE31E3FE-EFE9-44AA-998B-2BFC046B8422
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""><div class=3D"">He=
re=E2=80=99s another proposal. The goal is to keep <font face=3D"Courier" c=
lass=3D"">std::function</font> as well-behaved as it always has been, while=
also providing a means to precisely control its resource allocations. Hope=
fully this will be my most esoteric write-up for a while.</div><div class=
=3D""><br class=3D""></div>Abstract:<div class=3D""><br class=3D""></div><d=
iv class=3D""><p style=3D"margin: 0px 0px 6px; font-family: Times; -webkit-=
text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=
=3D"">The Fundamentals TS v.1 introduces a new architecture for <span style=
=3D"font-size: 11px; font-family: Courier; background-color: rgb(245, 245, =
245);" class=3D"">function</span>, where it enforces an allocation scheme o=
n its target objects. Because move assignment reallocates the new value, it=
fails to provide a <span style=3D"font-size: 11px; font-family: Courier; b=
ackground-color: rgb(245, 245, 245);" class=3D"">noexcept</span> guarantee.=
It also may subtly introduce bugs and breakage. The status quo is more int=
uitive, in terms of reference and value semantics. The new scheme also requ=
ires parallel type erasure of the allocator, costing memory and performance=
.. This proposal formalizes the current <span style=3D"font-size: 11px; font=
-family: Courier; background-color: rgb(245, 245, 245);" class=3D"">std::fu=
nction</span> model with only minor extensions, and introduces a new, inter=
operable but allocator-aware class <span style=3D"font-size: 11px; font-fam=
ily: Courier; background-color: rgb(245, 245, 245);" class=3D"">function_co=
ntainer</span> to enforce allocation guarantees. <span style=3D"font-size: =
11px; font-family: Courier; background-color: rgb(245, 245, 245);" class=3D=
"">fundamentals_v1::function</span> fits neatly into its container model. A=
complete, high-quality reference implementation is provided.</p></div><div=
class=3D""><br class=3D""></div><div class=3D"">PDF: <a href=3D"http://bit=
..ly/allocfun" class=3D"">bit.ly/allocfun</a></div><div class=3D""><br class=
=3D""></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" 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=_BE31E3FE-EFE9-44AA-998B-2BFC046B8422--
.