Topic: N3722: DefaultConstructible requirement


Author: =?UTF-8?Q?Agust=C3=ADn_Berg=C3=A9?= <kaballo@gmail.com>
Date: Mon, 2 Sep 2013 14:05:43 -0700 (PDT)
Raw View
------=_Part_3644_22521171.1378155943113
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

*N3722* requires the return type of a resumable function to be future<T> or=
=20
shared_future<T> where T is DefaultConstructible:

*[2.3 Restrictions]*
>
> The return type of a resumable function must be future<T> or=20
> shared_future<T>. The restrictions on T are defined by std::future, not=
=20
> this proposal, but T must be a copyable or  movable type, or =91void.=92 =
It=20
> must also be possible to construct a variable of T without an argument;=
=20
> that is, it has to have an accessible (implicit or explicit) defaultconst=
ructor if it is of a class type=20
>

A previous revision mentions that this restriction is imposed by await.

Why is this needed? Under which conditions does await need to=20
default-construct an object of type T?

Regards,
Agust=EDn K-ballo Berg=E9.-
http://talesofcpp.fusionfenix.com

--=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/.

------=_Part_3644_22521171.1378155943113
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><b>N3722</b> requires the return type of a resumable funct=
ion to be <span style=3D"font-family: courier new,monospace;">future&lt;T&g=
t;</span> or <span style=3D"font-family: courier new,monospace;">shared_fut=
ure&lt;T&gt;</span> where <span style=3D"font-family: courier new,monospace=
;">T</span> is <span style=3D"font-family: courier new,monospace;">DefaultC=
onstructible</span>:<br><br><blockquote style=3D"margin: 0px 0px 0px 0.8ex;=
 border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class=3D"gm=
ail_quote"><i>[2.3 Restrictions]</i><br><br><div dir=3D"ltr" style=3D"font-=
size: 14.72px; font-family: sans-serif; left: 119.232px; top: 414.627px; tr=
ansform: scale(0.929358, 1); transform-origin: 0% 0% 0px;" data-font-name=
=3D"g_font_p0_1" data-canvas-width=3D"260.2201677551651">The return type of=
 a resumable function must be future&lt;T&gt; or shared_future&lt;T&gt;. Th=
e restrictions on T are defined by std::future, not this proposal, but T mu=
st be a copyable or&nbsp; movable type, or =91void.=92 It must also be poss=
ible to construct a variable of T without an argument; that is, it has to h=
ave an accessible (implicit or explicit) <span class=3D"highlight selected"=
>default</span> constructor if it is of a class type </div></blockquote><br=
>A previous revision mentions that this restriction is imposed by <span sty=
le=3D"font-family: courier new,monospace;">await</span>.<br><br>Why is this=
 needed? Under which conditions does <span style=3D"font-family: courier ne=
w,monospace;">await</span> need to default-construct an object of type <spa=
n style=3D"font-family: courier new,monospace;">T</span>?<br><br>Regards,<b=
r>Agust=EDn K-ballo Berg=E9.-<br>http://talesofcpp.fusionfenix.com<br><br><=
/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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_3644_22521171.1378155943113--

.


Author: cornedbee@google.com
Date: Tue, 3 Sep 2013 09:14:09 -0700 (PDT)
Raw View
------=_Part_308_31525316.1378224849850
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable



On Monday, September 2, 2013 11:05:43 PM UTC+2, Agust=EDn Berg=E9 wrote:
>
> *N3722* requires the return type of a resumable function to be future<T>o=
r=20
> shared_future<T> where T is DefaultConstructible:
>
> *[2.3 Restrictions]*
>>
>> The return type of a resumable function must be future<T> or=20
>> shared_future<T>. The restrictions on T are defined by std::future, not=
=20
>> this proposal,
>>
>
Oddly enough, I cannot find any explicit restrictions on the argument type=
=20
for a future at all in C++11. And I rediscovered DR2096 while searching for=
=20
them.

http://cplusplus.github.io/LWG/lwg-defects.html#2096

--=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/.

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

<div dir=3D"ltr"><br><br>On Monday, September 2, 2013 11:05:43 PM UTC+2, Ag=
ust=EDn Berg=E9 wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;=
margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><b>N3722</b> requires the return type of a resumable function to b=
e <span style=3D"font-family:courier new,monospace">future&lt;T&gt;</span> =
or <span style=3D"font-family:courier new,monospace">shared_future&lt;T&gt;=
</span> where <span style=3D"font-family:courier new,monospace">T</span> is=
 <span style=3D"font-family:courier new,monospace">DefaultConstructible</sp=
an>:<br><br><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s=
olid rgb(204,204,204);padding-left:1ex" class=3D"gmail_quote"><i>[2.3 Restr=
ictions]</i><br><br><div dir=3D"ltr" style=3D"font-size:14.72px;font-family=
:sans-serif">The return type of a resumable function must be future&lt;T&gt=
; or shared_future&lt;T&gt;. The restrictions on T are defined by std::futu=
re, not this proposal,</div></blockquote></div></blockquote><div><br></div>=
<div>Oddly enough, I cannot find any explicit restrictions on the argument =
type for a future at all in C++11. And I rediscovered DR2096 while searchin=
g for them.</div><div><br></div><div><a href=3D"http://cplusplus.github.io/=
LWG/lwg-defects.html#2096">http://cplusplus.github.io/LWG/lwg-defects.html#=
2096</a><br></div></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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_308_31525316.1378224849850--

.


Author: =?UTF-8?Q?Agust=C3=ADn_Berg=C3=A9?= <kaballo@gmail.com>
Date: Wed, 4 Sep 2013 07:50:53 -0700 (PDT)
Raw View
------=_Part_5663_6564775.1378306254024
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Tuesday, September 3, 2013 11:14:09 AM UTC-5, corn...@google.com wrote:
>
>
>
> On Monday, September 2, 2013 11:05:43 PM UTC+2, Agust=EDn Berg=E9 wrote:
>>
>> *N3722* requires the return type of a resumable function to be future<T>=
or=20
>> shared_future<T> where T is DefaultConstructible:
>>
>> *[2.3 Restrictions]*
>>>
>>> The return type of a resumable function must be future<T> or=20
>>> shared_future<T>. The restrictions on T are defined by std::future, not=
=20
>>> this proposal,
>>>
>>
> Oddly enough, I cannot find any explicit restrictions on the argument typ=
e=20
> for a future at all in C++11. And I rediscovered DR2096 while searching f=
or=20
> them.
>

I can't find any explicit restrictions either at C++14 Draft (*N3690*).=20
Furthermore, the proposed wording of *N3722* does not seem to include=20
anything related to restrictions on T.

It would be interesting to know which are the actual restrictions of T, if=
=20
any, and why are they imposed.

Regards,
Agust=EDn K-ballo Berg=E9.-
http://talesofcpp.fusionfenix.com

--=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/.

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

<div dir=3D"ltr">On Tuesday, September 3, 2013 11:14:09 AM UTC-5, corn...@g=
oogle.com wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin=
-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"lt=
r"><br><br>On Monday, September 2, 2013 11:05:43 PM UTC+2, Agust=EDn Berg=
=E9 wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0=
..8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><b>N3722=
</b> requires the return type of a resumable function to be <span style=3D"=
font-family:courier new,monospace">future&lt;T&gt;</span> or <span style=3D=
"font-family:courier new,monospace">shared_future&lt;T&gt;</span> where <sp=
an style=3D"font-family:courier new,monospace">T</span> is <span style=3D"f=
ont-family:courier new,monospace">DefaultConstructible</span>:<br><br><bloc=
kquote style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,=
204);padding-left:1ex" class=3D"gmail_quote"><i>[2.3 Restrictions]</i><br><=
br><div dir=3D"ltr" style=3D"font-size:14.72px;font-family:sans-serif">The =
return type of a resumable function must be future&lt;T&gt; or shared_futur=
e&lt;T&gt;. The restrictions on T are defined by std::future, not this prop=
osal,</div></blockquote></div></blockquote><div><br></div><div>Oddly enough=
, I cannot find any explicit restrictions on the argument type for a future=
 at all in C++11. And I rediscovered DR2096 while searching for them.</div>=
</div></blockquote><div><br>I can't find any explicit restrictions either a=
t C++14 Draft (<i>N3690</i>). Furthermore, the proposed wording of <i>N3722=
</i> does not seem to include anything related to restrictions on <span sty=
le=3D"font-family: courier new,monospace;">T</span>.<br><br>It would be int=
eresting to know which are the actual restrictions of <span style=3D"font-f=
amily: courier new,monospace;">T</span>, if any, and why are they imposed.<=
br><br>Regards,<br>Agust=EDn K-ballo Berg=E9.-<br><a href=3D"http://talesof=
cpp.fusionfenix.com" target=3D"_blank">http://talesofcpp.fusionfenix.<wbr>c=
om</a><br><br></div></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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_5663_6564775.1378306254024--

.