Topic: A proposal to add lambda/function traits to
Author: "Billy O'Neal" <billy.oneal@gmail.com>
Date: Wed, 13 Nov 2013 13:11:15 -0800
Raw View
--089e0118470233129c04eb156a06
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
What does it mean that a lambda is stateless?
Billy O'Neal
https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
http://stackoverflow.com/users/82320/billy-oneal
Malware Response Instructor - BleepingComputer.com
On Wed, Nov 13, 2013 at 1:09 PM, <morwenn29@gmail.com> wrote:
> Something that came up today on StackOverflow:
> http://stackoverflow.com/questions/19961873/test-if-a-lambda-is-stateless
>
> You might want to add such a trait to your proposal to check whether a
> lambda is stateless :)
>
> Le mercredi 6 novembre 2013 19:35:18 UTC+1, Emil 'Skeen' Madsen a =E9crit=
:
>>
>> I just finished writing the first draft of my first proposal ever.
>> And before submitting it, I'd like to discuss the matter at hand, and th=
e
>> proposal at this forum.
>>
>> The proposal is about adding traits, to determine a lambdas return and
>> argument type(s) at compile time, to the standard library.
>>
>> Have a look,
>> I'm open to all kinds of criticism and feedback :)
>>
>> // Emil 'Skeen' Madsen.
>>
> --
>
> ---
> 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/.
>
--=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/.
--089e0118470233129c04eb156a06
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">What does it mean that a lambda is stateless?</div><div cl=
ass=3D"gmail_extra"><br clear=3D"all"><div><div dir=3D"ltr"><div>Billy O=
9;Neal</div><div><a href=3D"https://bitbucket.org/BillyONeal/" target=3D"_b=
lank">https://github.com/BillyONeal/</a></div>
<div><a href=3D"http://stackoverflow.com/users/82320/billy-oneal" target=3D=
"_blank">http://stackoverflow.com/users/82320/billy-oneal</a></div><div>Mal=
ware Response Instructor - BleepingComputer.com</div></div></div>
<br><br><div class=3D"gmail_quote">On Wed, Nov 13, 2013 at 1:09 PM, <span =
dir=3D"ltr"><<a href=3D"mailto:morwenn29@gmail.com" target=3D"_blank">mo=
rwenn29@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote=
" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">Something that came up today on StackOverflow: <a href=3D"=
http://stackoverflow.com/questions/19961873/test-if-a-lambda-is-stateless" =
target=3D"_blank">http://stackoverflow.com/questions/19961873/test-if-a-lam=
bda-is-stateless</a><br>
<br>You might want to add such a trait to your proposal to check whether a =
lambda is stateless :)<br><br>Le mercredi 6 novembre 2013 19:35:18 UTC+1, E=
mil 'Skeen' Madsen a =E9crit=A0:<blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204=
,204,204);border-left-width:1px;border-left-style:solid">
<div dir=3D"ltr">I just finished writing the first draft of my first propos=
al ever.<br>And before submitting it, I'd like to discuss the matter at=
hand, and the proposal at this forum.<br><br>The proposal is about adding =
traits, to determine a lambdas return and argument type(s) at compile time,=
to the standard library.<br>
<br>Have a look,<br>I'm open to all kinds of criticism and feedback :)<=
br><br>// Emil 'Skeen' Madsen.<span class=3D"HOEnZb"><font color=3D=
"#888888"><br></font></span></div></blockquote></div><span class=3D"HOEnZb"=
><font color=3D"#888888">
<p></p>
-- <br>
=A0<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%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</font></span></blockquote></div><br></div>
<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 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 />
--089e0118470233129c04eb156a06--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Wed, 13 Nov 2013 23:22:36 +0200
Raw View
On 13 November 2013 23:09, <morwenn29@gmail.com> wrote:
> Something that came up today on StackOverflow:
> http://stackoverflow.com/questions/19961873/test-if-a-lambda-is-stateless
>
> You might want to add such a trait to your proposal to check whether a
> lambda is stateless :)
Perhaps that's why he already commented the SO discussion:
"I'm going to add something alike this to my standards proposal. =96 Skeen=
"
;)
--=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/.
.
Author: morwenn29@gmail.com
Date: Wed, 13 Nov 2013 13:23:17 -0800 (PST)
Raw View
------=_Part_360_17418735.1384377797502
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
It means that its capture list is empty. This can be useful since a lambda=
=20
without a capture list can be converted to a function pointer.
Le mercredi 13 novembre 2013 22:11:15 UTC+1, Billy O'Neal a =E9crit :
>
> What does it mean that a lambda is stateless?
>
> Billy O'Neal
> https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
> http://stackoverflow.com/users/82320/billy-oneal
> Malware Response Instructor - BleepingComputer.com
>
>
> On Wed, Nov 13, 2013 at 1:09 PM, <morw...@gmail.com <javascript:>> wrote:
>
>> Something that came up today on StackOverflow:=20
>> http://stackoverflow.com/questions/19961873/test-if-a-lambda-is-stateles=
s
>>
>> You might want to add such a trait to your proposal to check whether a=
=20
>> lambda is stateless :)
>>
>> Le mercredi 6 novembre 2013 19:35:18 UTC+1, Emil 'Skeen' Madsen a =E9cri=
t :
>>>
>>> I just finished writing the first draft of my first proposal ever.
>>> And before submitting it, I'd like to discuss the matter at hand, and=
=20
>>> the proposal at this forum.
>>>
>>> The proposal is about adding traits, to determine a lambdas return and=
=20
>>> argument type(s) at compile time, to the standard library.
>>>
>>> Have a look,
>>> I'm open to all kinds of criticism and feedback :)
>>>
>>> // Emil 'Skeen' Madsen.
>>>
>> --=20
>> =20
>> ---=20
>> You received this message because you are subscribed to the Google Group=
s=20
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n=20
>> email to std-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> Visit this group at=20
>> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>>
>
>
--=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_360_17418735.1384377797502
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">It means that its capture list is empty. This can be usefu=
l since a lambda without a capture list can be converted to a function poin=
ter.<br><br>Le mercredi 13 novembre 2013 22:11:15 UTC+1, Billy O'Neal a =E9=
crit :<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">Wh=
at does it mean that a lambda is stateless?</div><div><br clear=3D"all"><di=
v><div dir=3D"ltr"><div>Billy O'Neal</div><div><a href=3D"https://bitbucket=
..org/BillyONeal/" target=3D"_blank">https://github.com/BillyONeal/</a></div=
>
<div><a href=3D"http://stackoverflow.com/users/82320/billy-oneal" target=3D=
"_blank">http://stackoverflow.com/<wbr>users/82320/billy-oneal</a></div><di=
v>Malware Response Instructor - BleepingComputer.com</div></div></div>
<br><br><div class=3D"gmail_quote">On Wed, Nov 13, 2013 at 1:09 PM, <span =
dir=3D"ltr"><<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-ma=
ilto=3D"vHbrnoftGyoJ">morw...@gmail.com</a>></span> wrote:<br><blockquot=
e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
id;padding-left:1ex">
<div dir=3D"ltr">Something that came up today on StackOverflow: <a href=3D"=
http://stackoverflow.com/questions/19961873/test-if-a-lambda-is-stateless" =
target=3D"_blank">http://stackoverflow.com/<wbr>questions/19961873/test-if-=
a-<wbr>lambda-is-stateless</a><br>
<br>You might want to add such a trait to your proposal to check whether a =
lambda is stateless :)<br><br>Le mercredi 6 novembre 2013 19:35:18 UTC+1, E=
mil 'Skeen' Madsen a =E9crit :<blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204=
,204);border-left-width:1px;border-left-style:solid">
<div dir=3D"ltr">I just finished writing the first draft of my first propos=
al ever.<br>And before submitting it, I'd like to discuss the matter at han=
d, and the proposal at this forum.<br><br>The proposal is about adding trai=
ts, to determine a lambdas return and argument type(s) at compile time, to =
the standard library.<br>
<br>Have a look,<br>I'm open to all kinds of criticism and feedback :)<br><=
br>// Emil 'Skeen' Madsen.<span><font color=3D"#888888"><br></font></span><=
/div></blockquote></div><span><font color=3D"#888888">
<p></p>
-- <br>
<br>
--- <br>
You received this message because you are subscribed to the Google Groups "=
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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
vHbrnoftGyoJ">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"vHbrnoftGyoJ">std-pr...@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/<wbr>isocpp.or=
g/group/std-<wbr>proposals/</a>.<br>
</font></span></blockquote></div><br></div>
</blockquote></div>
<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 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_360_17418735.1384377797502--
.
Author: "Billy O'Neal" <billy.oneal@gmail.com>
Date: Wed, 13 Nov 2013 13:27:15 -0800
Raw View
--089e013d0db0724dca04eb15a3ee
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Not quite -- this detection fails for other stateless functions, e.g.
struct MyFunctor
{
// Stateless
void operator()(int x)
{
// ...
}
};
If you want to test whether the thing is convertible to a function pointer,
use std::is_convertible<http://en.cppreference.com/w/cpp/types/is_convertib=
le>--
it already exists and answers the question you really are asking here.
Billy O'Neal
https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
http://stackoverflow.com/users/82320/billy-oneal
Malware Response Instructor - BleepingComputer.com
On Wed, Nov 13, 2013 at 1:23 PM, <morwenn29@gmail.com> wrote:
> It means that its capture list is empty. This can be useful since a lambd=
a
> without a capture list can be converted to a function pointer.
>
> Le mercredi 13 novembre 2013 22:11:15 UTC+1, Billy O'Neal a =E9crit :
>>
>> What does it mean that a lambda is stateless?
>>
>> Billy O'Neal
>> https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
>> http://stackoverflow.com/users/82320/billy-oneal
>> Malware Response Instructor - BleepingComputer.com
>>
>>
>> On Wed, Nov 13, 2013 at 1:09 PM, <morw...@gmail.com> wrote:
>>
>>> Something that came up today on StackOverflow:
>>> http://stackoverflow.com/questions/19961873/test-if-a-
>>> lambda-is-stateless
>>>
>>> You might want to add such a trait to your proposal to check whether a
>>> lambda is stateless :)
>>>
>>> Le mercredi 6 novembre 2013 19:35:18 UTC+1, Emil 'Skeen' Madsen a =E9cr=
it :
>>>>
>>>> I just finished writing the first draft of my first proposal ever.
>>>> And before submitting it, I'd like to discuss the matter at hand, and
>>>> the proposal at this forum.
>>>>
>>>> The proposal is about adding traits, to determine a lambdas return and
>>>> argument type(s) at compile time, to the standard library.
>>>>
>>>> Have a look,
>>>> I'm open to all kinds of criticism and feedback :)
>>>>
>>>> // Emil 'Skeen' Madsen.
>>>>
>>> --
>>>
>>> ---
>>> 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-proposal...@isocpp.org.
>>> To post to this group, send email to std-pr...@isocpp.org.
>>>
>>> Visit this group at http://groups.google.com/a/isocpp.org/group/std-
>>> proposals/.
>>>
>>
>> --
>
> ---
> 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/.
>
--=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/.
--089e013d0db0724dca04eb15a3ee
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Not quite -- this detection fails for other stateless=
functions, e.g. </div><div>=A0</div><div><font face=3D"courier new,monospa=
ce">struct MyFunctor<br>{<br>=A0=A0=A0 // Stateless<br>=A0=A0=A0 void opera=
tor()(int x)<br>
=A0=A0=A0 {<br>=A0=A0=A0=A0=A0=A0=A0 // ...<br>=A0=A0=A0 }<br>};</font><br>=
</div><div>If you want to test whether the thing is convertible to a functi=
on pointer, use <a href=3D"http://en.cppreference.com/w/cpp/types/is_conver=
tible">std::is_convertible</a> -- it already exists and answers the questio=
n you really are asking here.</div>
</div><div class=3D"gmail_extra"><br clear=3D"all"><div><div dir=3D"ltr"><d=
iv>Billy O'Neal</div><div><a href=3D"https://bitbucket.org/BillyONeal/"=
target=3D"_blank">https://github.com/BillyONeal/</a></div><div><a href=3D"=
http://stackoverflow.com/users/82320/billy-oneal" target=3D"_blank">http://=
stackoverflow.com/users/82320/billy-oneal</a></div>
<div>Malware Response Instructor - BleepingComputer.com</div></div></div>
<br><br><div class=3D"gmail_quote">On Wed, Nov 13, 2013 at 1:23 PM, <span =
dir=3D"ltr"><<a href=3D"mailto:morwenn29@gmail.com" target=3D"_blank">mo=
rwenn29@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote=
" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">It means that its capture list is empty. This can be usefu=
l since a lambda without a capture list can be converted to a function poin=
ter.<br><br>Le mercredi 13 novembre 2013 22:11:15 UTC+1, Billy O'Neal a=
=E9crit=A0:<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
..8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:=
1px;border-left-style:solid">
<div class=3D"im"><div dir=3D"ltr">What does it mean that a lambda is state=
less?</div></div><div><div class=3D"im"><br clear=3D"all"><div><div dir=3D"=
ltr"><div>Billy O'Neal</div><div><a href=3D"https://bitbucket.org/Billy=
ONeal/" target=3D"_blank">https://github.com/BillyONeal/</a></div>
<div><a href=3D"http://stackoverflow.com/users/82320/billy-oneal" target=3D=
"_blank">http://stackoverflow.com/<u></u>users/82320/billy-oneal</a></div><=
div>Malware Response Instructor - BleepingComputer.com</div></div></div>
<br><br></div><div class=3D"gmail_quote"><div class=3D"im">On Wed, Nov 13, =
2013 at 1:09 PM, <span dir=3D"ltr"><<a>morw...@gmail.com</a>></span>=
wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-w=
idth:1px;border-left-style:solid">
<div class=3D"im">
<div dir=3D"ltr">Something that came up today on StackOverflow: <a href=3D"=
http://stackoverflow.com/questions/19961873/test-if-a-lambda-is-stateless" =
target=3D"_blank">http://stackoverflow.com/<u></u>questions/19961873/test-i=
f-a-<u></u>lambda-is-stateless</a><br>
<br>You might want to add such a trait to your proposal to check whether a =
lambda is stateless :)<br><br>Le mercredi 6 novembre 2013 19:35:18 UTC+1, E=
mil 'Skeen' Madsen a =E9crit=A0:<blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204=
,204,204);border-left-width:1px;border-left-style:solid">
<div dir=3D"ltr">I just finished writing the first draft of my first propos=
al ever.<br>And before submitting it, I'd like to discuss the matter at=
hand, and the proposal at this forum.<br><br>The proposal is about adding =
traits, to determine a lambdas return and argument type(s) at compile time,=
to the standard library.<br>
<br>Have a look,<br>I'm open to all kinds of criticism and feedback :)<=
br><br>// Emil 'Skeen' Madsen.<span><font color=3D"#888888"><br></f=
ont></span></div></blockquote></div></div><span><font color=3D"#888888"><di=
v class=3D"im">
<p></p>
-- <br>
=A0<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br></div>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a>std-proposal...@<u></u>isocpp.org</a>.<br>
To post to this group, send email to <a>std-pr...@isocpp.org</a>.<div class=
=3D"im"><br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/<u></u>isocpp.=
org/group/std-<u></u>proposals/</a>.<br>
</div></font></span></blockquote></div><br></div>
</blockquote></div><div class=3D"HOEnZb"><div class=3D"h5">
<p></p>
-- <br>
=A0<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%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>
<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 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 />
--089e013d0db0724dca04eb15a3ee--
.
Author: morwenn29@gmail.com
Date: Wed, 13 Nov 2013 15:05:13 -0800 (PST)
Raw View
------=_Part_501_27982144.1384383913500
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
Woah, beats me, I didn't see that one! :D
@Billy: Well, at least with is_stateless, you don't really have to care=20
about the exact function pointer type right from the start. I don't know=20
whether this is a good thing though.
Le mercredi 13 novembre 2013 22:22:36 UTC+1, Ville Voutilainen a =E9crit :
>
> On 13 November 2013 23:09, <morw...@gmail.com <javascript:>> wrote:=20
> > Something that came up today on StackOverflow:=20
> >=20
> http://stackoverflow.com/questions/19961873/test-if-a-lambda-is-stateless=
=20
> >=20
> > You might want to add such a trait to your proposal to check whether a=
=20
> > lambda is stateless :)=20
>
> Perhaps that's why he already commented the SO discussion:=20
> "I'm going to add something alike this to my standards proposal. =96 Ske=
en"=20
> ;)=20
>
--=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_501_27982144.1384383913500
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Woah, beats me, I didn't see that one! :D<br><br>@Billy: W=
ell, at least with is_stateless, you don't really have to care about the ex=
act function pointer type right from the start. I don't know whether this i=
s a good thing though.<br><br>Le mercredi 13 novembre 2013 22:22:36 UTC+1, =
Ville Voutilainen a =E9crit :<blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;">On 13 November 2013 23:09, <<a href=3D"javascript:" target=
=3D"_blank" gdf-obfuscated-mailto=3D"Lbs5qOl8fGMJ">morw...@gmail.com</a>>=
; wrote:
<br>> Something that came up today on StackOverflow:
<br>> <a href=3D"http://stackoverflow.com/questions/19961873/test-if-a-l=
ambda-is-stateless" target=3D"_blank">http://stackoverflow.com/<wbr>questio=
ns/19961873/test-if-a-<wbr>lambda-is-stateless</a>
<br>>
<br>> You might want to add such a trait to your proposal to check wheth=
er a
<br>> lambda is stateless :)
<br>
<br>Perhaps that's why he already commented the SO discussion:
<br>"I'm going to add something alike this to my standards proposal. =96 &n=
bsp;Skeen"
<br>;)
<br></blockquote></div>
<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 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_501_27982144.1384383913500--
.
Author: Nevin Liber <nevin@eviloverlord.com>
Date: Wed, 13 Nov 2013 17:21:28 -0600
Raw View
--f46d04389079e97e7204eb173bf4
Content-Type: text/plain; charset=ISO-8859-1
On 13 November 2013 17:05, <morwenn29@gmail.com> wrote:
> Woah, beats me, I didn't see that one! :D
>
> @Billy: Well, at least with is_stateless, you don't really have to care
> about the exact function pointer type right from the start.
>
How about just using std::is_empty?
--
Nevin ":-)" Liber <mailto:nevin@eviloverlord.com> (847) 691-1404
--
---
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/.
--f46d04389079e97e7204eb173bf4
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On 13 November 2013 17:05, <span dir=3D"ltr"><<a href=
=3D"mailto:morwenn29@gmail.com" target=3D"_blank">morwenn29@gmail.com</a>&g=
t;</span> wrote:<br><div class=3D"gmail_extra"><div class=3D"gmail_quote"><=
blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
#ccc solid;padding-left:1ex">
<div dir=3D"ltr">Woah, beats me, I didn't see that one! :D<br><br>@Bill=
y: Well, at least with is_stateless, you don't really have to care abou=
t the exact function pointer type right from the start.</div></blockquote>
<div><br></div><div>How about just using std::is_empty?<br clear=3D"all"></=
div></div>-- <br>=A0Nevin ":-)" Liber=A0 <mailto:<a href=3D"ma=
ilto:nevin@eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>&g=
t;=A0 (847) 691-1404
</div></div>
<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 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 />
--f46d04389079e97e7204eb173bf4--
.
Author: "Billy O'Neal" <billy.oneal@gmail.com>
Date: Wed, 27 Nov 2013 14:40:43 -0500
Raw View
--089e01175d5d3ffcd104ec2dc8eb
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
What do you mean by a predicate? Just that it returns bool? If so, you can
already find that out using result_of.
Billy O'Neal
https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
http://stackoverflow.com/users/82320/billy-oneal
Malware Response Instructor - BleepingComputer.com
On Wed, Nov 27, 2013 at 2:14 PM, <morwenn29@gmail.com> wrote:
> Another function-related trait that could be useful would be a trait to
> check whether a given function is a predicate or not.
>
>
> Le mercredi 6 novembre 2013 19:35:18 UTC+1, Emil 'Skeen' Madsen a =E9crit=
:
>>
>> I just finished writing the first draft of my first proposal ever.
>> And before submitting it, I'd like to discuss the matter at hand, and th=
e
>> proposal at this forum.
>>
>> The proposal is about adding traits, to determine a lambdas return and
>> argument type(s) at compile time, to the standard library.
>>
>> Have a look,
>> I'm open to all kinds of criticism and feedback :)
>>
>> // Emil 'Skeen' Madsen.
>>
> --
>
> ---
> 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/.
>
--=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/.
--089e01175d5d3ffcd104ec2dc8eb
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">What do you mean by a predicate? Just that it returns bool=
? If so, you can already find that out using result_of.</div><div class=3D"=
gmail_extra"><br clear=3D"all"><div><div dir=3D"ltr"><div>Billy O'Neal<=
/div>
<div><a href=3D"https://bitbucket.org/BillyONeal/" target=3D"_blank">https:=
//github.com/BillyONeal/</a></div><div><a href=3D"http://stackoverflow.com/=
users/82320/billy-oneal" target=3D"_blank">http://stackoverflow.com/users/8=
2320/billy-oneal</a></div>
<div>Malware Response Instructor - BleepingComputer.com</div></div></div>
<br><br><div class=3D"gmail_quote">On Wed, Nov 27, 2013 at 2:14 PM, <span =
dir=3D"ltr"><<a href=3D"mailto:morwenn29@gmail.com" target=3D"_blank">mo=
rwenn29@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote=
" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">Another function-related trait that could be useful would =
be a trait to check whether a given function is a predicate or not.<div cla=
ss=3D"im"><br><br>Le mercredi 6 novembre 2013 19:35:18 UTC+1, Emil 'Ske=
en' Madsen a =E9crit=A0:<blockquote class=3D"gmail_quote" style=3D"marg=
in:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr">I just finished writing the first draft of my first propos=
al ever.<br>And before submitting it, I'd like to discuss the matter at=
hand, and the proposal at this forum.<br><br>The proposal is about adding =
traits, to determine a lambdas return and argument type(s) at compile time,=
to the standard library.<br>
<br>Have a look,<br>I'm open to all kinds of criticism and feedback :)<=
br><br>// Emil 'Skeen' Madsen.<br></div></blockquote></div></div><d=
iv class=3D"HOEnZb"><div class=3D"h5">
<p></p>
-- <br>
=A0<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%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>
<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 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 />
--089e01175d5d3ffcd104ec2dc8eb--
.