Topic: N3558: Add (fast) non-checking invocation operator to std::future


Author: lcidfire@gmail.com
Date: Wed, 3 Apr 2013 07:17:06 -0700 (PDT)
Raw View
------=_Part_478_5916169.1364998626667
Content-Type: text/plain; charset=ISO-8859-1

Since I am beginning to code using the N3558 extension I wonder whether
std::future could use another retrieval operator.
When using containers one can choose to use std::vector::operator[] or
std::vector::at. Similarly, using std::future::get could get a
non-checking/waiting variant with std::future::operator(), Personally I
would prefer this because calling std::future::get in a then-lambda just
looks wrong (semantically) because in my head this get function is
associated with (possible) waiting/blocking.

--

---
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/?hl=en.



------=_Part_478_5916169.1364998626667
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Since I am beginning to code using the N3558 extension I wonder whether <fo=
nt face=3D"courier new, monospace">std::future</font> could use another ret=
rieval operator.<div>When using containers one can choose to use <font face=
=3D"courier new, monospace">std::vector::operator[]</font> or <font face=3D=
"courier new, monospace">std::vector::at</font>. Similarly, using <font fac=
e=3D"courier new, monospace">std::future::get</font> could get a non-checki=
ng/waiting variant with <font face=3D"courier new, monospace">std::future::=
operator()</font>, Personally I would prefer this because calling <font fac=
e=3D"courier new, monospace">std::future::get </font>in a <font face=3D"cou=
rier new, monospace">then</font>-lambda just looks wrong (semantically) bec=
ause in my head this <font face=3D"courier new, monospace">get</font> funct=
ion is associated with (possible) waiting/blocking.</div>

<p></p>

-- <br />
&nbsp;<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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_478_5916169.1364998626667--

.