Topic: [std-proposals] Draft unwinding_state: safe exce
Author: David Krauss <potswa@gmail.com>
Date: Mon, 14 Sep 2015 17:56:32 +0800
Raw View
--Apple-Mail=_D36C6D1A-F30F-403D-AEFD-2911467BD48C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
Abstract:
std::uncaught_exception is now deprecated in favor of std::uncaught_excepti=
ons, which appears to be a drop-in replacement. Unfortunately, using it as =
such defeats its purpose. A class std::unwinding_state is proposed to encap=
sulate the correct usage. Since there is no other use for the current count=
of unwinding exceptions, it is proposed that the class replace uncaught_ex=
ceptions, to restore latitude and freedom of extension to implementations.
Interface:
class unwinding_state {
public:
unwinding_state() noexcept;
unwinding_state( unwinding_state const & ) noexcept;
unwinding_state & operator =3D ( unwinding_state const & ) noexcept;
~ unwinding_state();
explicit operator bool () const & noexcept;
};
PDF: http://bit.ly/uwsafe <http://bit.ly/uwsafe>
--=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=_D36C6D1A-F30F-403D-AEFD-2911467BD48C
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""><div class=3D""=
>Abstract:</div><div class=3D""><br class=3D""></div><div class=3D""><p sty=
le=3D"margin: 0px 0px 16px; font-family: Times; -webkit-text-stroke-color: =
rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=3D""><span style=
=3D"font-size: 11px; font-family: Courier; background-color: rgb(245, 245, =
245);" class=3D"">std::uncaught_exception</span> is now deprecated in favor=
of <span style=3D"font-size: 11px; font-family: Courier; background-color:=
rgb(245, 245, 245);" class=3D"">std::uncaught_exceptions</span>, which app=
ears to be a drop-in replacement. Unfortunately, using it as such defeats i=
ts purpose. A class <span style=3D"font-size: 11px; font-family: Courier; b=
ackground-color: rgb(245, 245, 245);" class=3D"">std::unwinding_state</span=
> is proposed to encapsulate the correct usage. Since there is no other use=
for the current count of unwinding exceptions, it is proposed that the cla=
ss replace <span style=3D"font-size: 11px; font-family: Courier; background=
-color: rgb(245, 245, 245);" class=3D"">uncaught_exceptions</span>, to rest=
ore latitude and freedom of extension to implementations.</p></div><div cla=
ss=3D""><br class=3D""></div><div class=3D"">Interface:</div><div class=3D"=
"><br class=3D""></div><div class=3D""><div style=3D"margin: 0px; font-size=
: 11px; font-family: Courier; -webkit-text-stroke-color: rgb(0, 0, 0); -web=
kit-text-stroke-width: initial;" class=3D"">class unwinding_state {</div><d=
iv style=3D"margin: 0px; font-size: 11px; font-family: Courier; -webkit-tex=
t-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=3D=
"">public:</div><div style=3D"margin: 0px; font-size: 11px; font-family: Co=
urier; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: =
initial;" class=3D""> unwinding_state() noexcept;</div><div st=
yle=3D"margin: 0px; font-size: 11px; font-family: Courier; -webkit-text-str=
oke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=3D"">&n=
bsp; unwinding_state( unwinding_state const & ) noexcept;</div><=
div style=3D"margin: 0px; font-size: 11px; font-family: Courier; -webkit-te=
xt-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=
=3D""> unwinding_state & operator =3D ( unwinding_state co=
nst & ) noexcept;</div><div style=3D"margin: 0px; font-size: 11px; font=
-family: Courier; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-str=
oke-width: initial;" class=3D""> ~ unwinding_state();</div><di=
v style=3D"margin: 0px; font-size: 11px; font-family: Courier; -webkit-text=
-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height=
: 13px;" class=3D""><br class=3D""></div><div style=3D"margin: 0px; font-si=
ze: 11px; font-family: Courier; -webkit-text-stroke-color: rgb(0, 0, 0); -w=
ebkit-text-stroke-width: initial;" class=3D""> explicit operat=
or bool () const & noexcept;</div><p style=3D"margin: 0px 0px 6px; font=
-size: 11px; font-family: Courier; -webkit-text-stroke-color: rgb(0, 0, 0);=
-webkit-text-stroke-width: initial;" class=3D"">};</p></div><div class=3D"=
"><br class=3D""></div>PDF: <a href=3D"http://bit.ly/uwsafe" class=3D"">htt=
p://bit.ly/uwsafe</a><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=_D36C6D1A-F30F-403D-AEFD-2911467BD48C--
.