Topic: exception_ptr emplace factory
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Tue, 17 Nov 2015 08:49:53 +0100
Raw View
This is a multi-part message in MIME format.
--------------020304070800020605020905
Content-Type: text/plain; charset=UTF-8; format=flowed
Hi, could the following exception_ptr emplace function be more efficient
in some cases. template<class E, class ...Args> exception_ptr
make_exception_ptr(Args&& ... args)
Effects: Creates an exception_ptr object that refers to a copy of
E{forward<Args>(args)...}, as if
try {
throw E{forward<Args>(args)...};
} catch(...) { return current_exception();
}
Could the current implementations avoid the copy and directly emplace
the constructed exception?
C++ International StandardVicente
C++ International Standard
--
---
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 email 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-proposals/.
--------------020304070800020605020905
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-8=
">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8=
">
<div class=3D"page" title=3D"Page 507">
<div class=3D"layoutArea">
<div class=3D"column">
<pre><span style=3D"font-size: 9.000000pt; font-family: 'LMMono9'=
">Hi,=20
could the following exception_ptr emplace function be more efficient in som=
e cases.=20
template<class E, class ...Args>=20
exception_ptr make_exception_ptr(Args&& ... args)
</span>
<span style=3D"font-size: 10.000000pt; font-family: 'LMRoman10'; font-style=
: italic">Effects: </span><span style=3D"font-size: 10.000000pt; font-famil=
y: 'LMRoman10'">Creates an </span><span style=3D"font-size: 10.000000pt; fo=
nt-family: 'LMMono10'">exception_ptr </span><span style=3D"font-size: 10.00=
0000pt; font-family: 'LMRoman10'">object that refers to a copy of </span><s=
pan style=3D"font-size: 9.000000pt; font-family: 'LMMono9'">E{forward<Ar=
gs>(args)...}</span><span style=3D"font-size: 10.000000pt; font-family: =
'LMMono10'"></span><span style=3D"font-size: 10.000000pt; font-family: 'LMR=
oman10'">, as if
</span></pre>
<div class=3D"page" title=3D"Page 507">
<div class=3D"layoutArea">
<div class=3D"column">
<p><span style=3D"font-size: 9.000000pt; font-family:
'LMMono9'">try {
<br>
=C2=A0=C2=A0=C2=A0 throw E{forward<Args>(args)...=
};
</span></p>
<pre><span style=3D"font-size: 9.000000pt; font-family: 'LM=
Mono9'"> } catch(...) {
return current_exception();
</span></pre>
<p><span style=3D"font-size: 9.000000pt; font-family:
'LMMono9'">}<br>
</span></p>
<pre><span style=3D"font-size: 9.000000pt; font-family: 'LM=
Mono9'">Could the current implementations avoid the copy and directly empla=
ce the constructed exception? </span></pre>
</div>
</div>
</div>
<pre><title>C++ International Standard</title>Vicente
</pre>
</div>
</div>
</div>
<title>C++ International Standard</title>
</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 />
--------------020304070800020605020905--
.