Topic: try block as lambda body
Author: Zhihao Yuan <lichray@gmail.com>
Date: Fri, 17 May 2013 23:56:30 -0400
Raw View
A quick thought
[]() try { return ...; } catch(...) { ... }
So it's consistent with the function definition (a weak argument,
ignore it if you want to argue), and can be used as a "try expression",
like what exists in ML (expression level catch).
Thoughts?
--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/
--
---
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.
.
Author: DeadMG <wolfeinstein@gmail.com>
Date: Fri, 17 May 2013 22:12:26 -0700 (PDT)
Raw View
------=_Part_960_1150303.1368853946642
Content-Type: text/plain; charset=ISO-8859-1
How is it meaningfully different to `[] { try { return ...; } catch (...) {
.... } }`
--
---
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_960_1150303.1368853946642
Content-Type: text/html; charset=ISO-8859-1
How is it meaningfully different to `[] { try { return ...; } catch (...) { ... } }`
<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 email 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="http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en">http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en</a>.<br />
<br />
<br />
------=_Part_960_1150303.1368853946642--
.
Author: Zhihao Yuan <lichray@gmail.com>
Date: Sat, 18 May 2013 01:53:08 -0400
Raw View
On Sat, May 18, 2013 at 1:12 AM, DeadMG <wolfeinstein@gmail.com> wrote:
> How is it meaningfully different to `[] { try { return ...; } catch (...) {
> ... } }`
No difference at all. However, another thought just came to me:
in the new CD, lambdas have initializers as the captures, which
means, we may have to add the following syntax
[] try (x{foo()}) { return ...; } catch (...) { ... }
to catch only the exceptions thrown from the constructors
but not the other expressions, like `foo()` in this case. Such
a semantics, you know, is as same as `try` block's on the
constructors (since `x` is just a data member).
But I don't know whether it's a problem or whether it's useful ;)
--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/
--
---
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.
.
Author: Nevin Liber <nevin@eviloverlord.com>
Date: Sat, 18 May 2013 00:58:06 -0500
Raw View
--089e0160bbb2f4c7fe04dcf7ca42
Content-Type: text/plain; charset=ISO-8859-1
On 18 May 2013 00:53, Zhihao Yuan <lichray@gmail.com> wrote:
> No difference at all. However, another thought just came to me:
> in the new CD, lambdas have initializers as the captures, which
> means, we may have to add the following syntax
>
> [] try (x{foo()}) { return ...; } catch (...) { ... }
>
1. Why? It isn't like structs/classes are going away.
2. Bad syntax, as it doesn't look like the try around the capture.
--
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/?hl=en.
--089e0160bbb2f4c7fe04dcf7ca42
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 18 May 2013 00:53, Zhihao Yuan <span dir=3D"ltr"><<a href=3D"mailto:l=
ichray@gmail.com" target=3D"_blank">lichray@gmail.com</a>></span> wrote:=
<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class=3D"im">No difference at all. =A0However, another thought just ca=
me to me:</div>
in the new CD, lambdas have initializers as the captures, which<br>
means, we may have to add the following syntax<br>
<br>
=A0 [] try (x{foo()}) { return ...; } catch (...) { ... }<br></blockquote><=
div><br></div><div>1. =A0Why? =A0It isn't like structs/classes are goin=
g away.</div><div>2. =A0Bad syntax, as it doesn't look like the try aro=
und the capture.</div>
</div>-- <br>=A0Nevin ":-)" Liber=A0 <mailto:<a href=3D"mailto=
:nevin@eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>>=
=A0 (847) 691-1404
<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/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
--089e0160bbb2f4c7fe04dcf7ca42--
.
Author: DeadMG <wolfeinstein@gmail.com>
Date: Fri, 17 May 2013 23:00:00 -0700 (PDT)
Raw View
------=_Part_1026_5369704.1368856800216
Content-Type: text/plain; charset=ISO-8859-1
No difference, since they are evaluated in the context of their surrounding
function.
struct x {
x() {}
x(const x&) { throw 1; }
};
int main() {
x var;
try {
auto y = [mem = var] {};
} catch(const int&) {
}
}
The only reason for constructor try/catch is because there is otherwise no
opportunity to catch those exceptions. That is not true of lambda captures
or lambda statements.
--
---
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_1026_5369704.1368856800216
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
No difference, since they are evaluated in the context of their surrounding=
function.<div><br></div><div>struct x {<br> x() {}</div><div>=
x(const x&) { throw 1; }</div><div>};</div><div>int main(=
) {<br> x var;</div><div> try {</div><div> =
auto y =3D [mem =3D var] {};</div><div> }=
catch(const int&) {</div><div> }<br>}</div><div><br></div=
><div>The only reason for constructor try/catch is because there is otherwi=
se no opportunity to catch those exceptions. That is not true of lambda cap=
tures or lambda statements.</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/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_1026_5369704.1368856800216--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sat, 18 May 2013 10:32:55 +0300
Raw View
--089e0115ef60a8bbb704dcf91b8d
Content-Type: text/plain; charset=ISO-8859-1
On 18 May 2013 08:53, Zhihao Yuan <lichray@gmail.com> wrote:
> On Sat, May 18, 2013 at 1:12 AM, DeadMG <wolfeinstein@gmail.com> wrote:
> > How is it meaningfully different to `[] { try { return ...; } catch
> (...) {
> > ... } }`
>
> No difference at all. However, another thought just came to me:
> in the new CD, lambdas have initializers as the captures, which
> means, we may have to add the following syntax
>
> [] try (x{foo()}) { return ...; } catch (...) { ... }
>
> to catch only the exceptions thrown from the constructors
> but not the other expressions, like `foo()` in this case. Such
>
>
>
We don't need such a try-catch because init captures. The c++11 lambdas
could've thrown in the copy constructors of captures, too, so either
you needed such a try-catch already then or you don't need it now either.
If you want fine-grained control over an init-capture, you can have a lambda
as your init-expression. ;)
--
---
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.
--089e0115ef60a8bbb704dcf91b8d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On 18 May 2013 08:53, Zhihao Yuan <span dir=3D"ltr"><<a href=3D"=
mailto:lichray@gmail.com" target=3D"_blank">lichray@gmail.com</a>></span=
> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div class=3D"im">On Sat, May 18, 2013 at 1:=
12 AM, DeadMG <<a href=3D"mailto:wolfeinstein@gmail.com">wolfeinstein@gm=
ail.com</a>> wrote:<br>
> How is it meaningfully different to `[] { try { return ...; } catch (.=
...) {<br>
> ... } }`<br>
<br>
</div>No difference at all. =A0However, another thought just came to me:<br=
>
in the new CD, lambdas have initializers as the captures, which<br>
means, we may have to add the following syntax<br>
<br>
=A0 [] try (x{foo()}) { return ...; } catch (...) { ... }<br>
<br>
to catch only the exceptions thrown from the constructors<br>
but not the other expressions, like `foo()` in this case. =A0Such<br>
<br><br></blockquote><div><br></div><div>=A0We don't need such a try-ca=
tch because init captures. The c++11 lambdas<br></div><div>could've thr=
own in the copy constructors of captures, too, so either<br></div><div>you =
needed such a try-catch already then or you don't need it now either.<b=
r>
<br></div><div>If you want fine-grained control over an init-capture, you c=
an have a lambda<br></div><div>as your init-expression. ;)<br></div></div><=
br></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/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
--089e0115ef60a8bbb704dcf91b8d--
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sat, 18 May 2013 00:44:32 -0700 (PDT)
Raw View
------=_Part_1313_9543589.1368863072997
Content-Type: text/plain; charset=ISO-8859-1
On Friday, May 17, 2013 10:53:08 PM UTC-7, Zhihao Yuan wrote:
>
> On Sat, May 18, 2013 at 1:12 AM, DeadMG <wolfei...@gmail.com <javascript:>>
> wrote:
> > How is it meaningfully different to `[] { try { return ...; } catch
> (...) {
> > ... } }`
>
> No difference at all. However, another thought just came to me:
> in the new CD, lambdas have initializers as the captures, which
> means, we may have to add the following syntax
>
> [] try (x{foo()}) { return ...; } catch (...) { ... }
>
> to catch only the exceptions thrown from the constructors
> but not the other expressions, like `foo()` in this case. Such
> a semantics, you know, is as same as `try` block's on the
> constructors (since `x` is just a data member).
>
> But I don't know whether it's a problem or whether it's useful ;)
>
That's just the wrong syntax. It would have to be like function level catch
blocks now:
[try x{foo()}] {...} catch(...) {}
And quite frankly, if you need that level of control, you should be writing
a proper class, not a lambda. We don't need to support *every possible thing
* you could do with a functor with lambdas.
--
---
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_1313_9543589.1368863072997
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Friday, May 17, 2013 10:53:08 PM UTC-7, Zhihao Yuan wrote:<blockquote cl=
ass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px =
#ccc solid;padding-left: 1ex;">On Sat, May 18, 2013 at 1:12 AM, DeadMG <=
<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"sUTYwyZH=
HogJ">wolfei...@gmail.com</a>> wrote:
<br>> How is it meaningfully different to `[] { try { return ...; } catc=
h (...) {
<br>> ... } }`
<br>
<br>No difference at all. However, another thought just came to me:
<br>in the new CD, lambdas have initializers as the captures, which
<br>means, we may have to add the following syntax
<br>
<br> [] try (x{foo()}) { return ...; } catch (...) { ... }
<br>
<br>to catch only the exceptions thrown from the constructors
<br>but not the other expressions, like `foo()` in this case. Such
<br>a semantics, you know, is as same as `try` block's on the
<br>constructors (since `x` is just a data member).
<br>
<br>But I don't know whether it's a problem or whether it's useful ;)
<br></blockquote><div><br>That's just the wrong syntax. It would have to be=
like function level catch blocks now:<br><br><div class=3D"prettyprint" st=
yle=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 18=
7); border-style: solid; border-width: 1px; word-wrap: break-word;"><code c=
lass=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">[</span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">try</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> x</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
>foo</span><span style=3D"color: #660;" class=3D"styled-by-prettify">()}]</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">{...}</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">catch</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">(...)</span><span style=3D"color: #000;"=
class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">{}</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"><br></span></div></code></div><br>And quite frankly, if you ne=
ed that level of control, you should be writing a proper class, not a lambd=
a. We don't need to support <i>every possible thing</i> you could do with a=
functor with lambdas.</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/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_1313_9543589.1368863072997--
.
Author: Zhihao Yuan <lichray@gmail.com>
Date: Sat, 18 May 2013 03:47:25 -0400
Raw View
On Sat, May 18, 2013 at 3:32 AM, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
> We don't need such a try-catch because init captures. The c++11 lambdas
> could've thrown in the copy constructors of captures, too, so either
> you needed such a try-catch already then or you don't need it now either.
Yes.
On Sat, May 18, 2013 at 3:44 AM, Nicol Bolas <jmckesson@gmail.com> wrote:
> On Friday, May 17, 2013 10:53:08 PM UTC-7, Zhihao Yuan wrote:
> That's just the wrong syntax. It would have to be like function level catch
> blocks now:
>
> [try x{foo()}] {...} catch(...) {}
-_-|||
> And quite frankly, if you need that level of control, you should be writing
> a proper class, not a lambda. We don't need to support every possible thing
> you could do with a functor with lambdas.
Agreed.
--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/
--
---
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.
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sat, 18 May 2013 10:56:45 +0300
Raw View
--001a11c2f5c4db0bc604dcf97039
Content-Type: text/plain; charset=ISO-8859-1
On 18 May 2013 10:47, Zhihao Yuan <lichray@gmail.com> wrote:
> On Sat, May 18, 2013 at 3:32 AM, Ville Voutilainen
> <ville.voutilainen@gmail.com> wrote:
> > We don't need such a try-catch because init captures. The c++11 lambdas
> > could've thrown in the copy constructors of captures, too, so either
> > you needed such a try-catch already then or you don't need it now either.
>
> Yes.
>
Here's something to gouge your eyes out with. :)
#include <iostream>
int main()
{
[x = [](){
try {
throw 6;
} catch(...) {
std::cout << "caught!" << std::endl;
} return 5;
}()]
{}();
}
This already works with the current gcc, with --std=gnu++11, and it throws
an exception
in the init-clause of the captured x, catches the exception and logs it,
and returns
the actual value for x.
--
---
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.
--001a11c2f5c4db0bc604dcf97039
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On 18 May 2013 10:47, Zhihao Yuan <span dir=3D"ltr"><<a href=3D"=
mailto:lichray@gmail.com" target=3D"_blank">lichray@gmail.com</a>></span=
> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex"><div class=3D"im">On Sat,=
May 18, 2013 at 3:32 AM, Ville Voutilainen<br>
<<a href=3D"mailto:ville.voutilainen@gmail.com">ville.voutilainen@gmail.=
com</a>> wrote:<br>
> =A0We don't need such a try-catch because init captures. The c++11=
lambdas<br>
> could've thrown in the copy constructors of captures, too, so eith=
er<br>
> you needed such a try-catch already then or you don't need it now =
either.<br>
<br>
</div>Yes.<br></blockquote><div><br></div><div>Here's something to goug=
e your eyes out with. :)<br><br>#include <iostream><br><br>int main()=
<br>{<br>=A0 [x =3D [](){<br>=A0=A0=A0=A0=A0 try {<br>=A0=A0=A0 throw 6;<br=
>=A0=A0=A0=A0=A0 } catch(...) {<br>
=A0=A0=A0 std::cout << "caught!" << std::endl;<br>=A0=
=A0=A0=A0=A0 } return 5;<br>=A0=A0=A0 }()]<br>=A0=A0=A0 {}();<br>}<br><br><=
/div></div>This already works with the current gcc, with --std=3Dgnu++11, a=
nd it throws an exception<br>
</div><div class=3D"gmail_extra">in the init-clause of the captured x, catc=
hes the exception and logs it, and returns<br>the actual value for x.<br></=
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/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
--001a11c2f5c4db0bc604dcf97039--
.
Author: =?UTF-8?Q?R=C3=B3bert_D=C3=A1vid?= <lrdxgm@gmail.com>
Date: Tue, 21 May 2013 16:54:19 -0700 (PDT)
Raw View
------=_Part_13_699281.1369180459927
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable
This feels like N3560 section 2.2 (isocpp.org seems to be offline at the=20
moment, so I can't give you a link), where the authors suggest to allow an=
=20
expression as a lambda body.
Regards, Robert
2013. m=E1jus 18., szombat 5:56:30 UTC+2 id=F5pontban Zhihao Yuan a k=F6vet=
kez=F5t=20
=EDrta:
>
> A quick thought=20
>
> []() try { return ...; } catch(...) { ... }=20
>
> So it's consistent with the function definition (a weak argument,=20
> ignore it if you want to argue), and can be used as a "try expression",=
=20
> like what exists in ML (expression level catch).=20
>
> Thoughts?=20
>
> --=20
> Zhihao Yuan, ID lichray=20
> The best way to predict the future is to invent it.=20
> ___________________________________________________=20
> 4BSD -- http://4bsd.biz/=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/?hl=3Den.
------=_Part_13_699281.1369180459927
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable
This feels like N3560 section 2.2 (isocpp.org seems to be offline at the m=
oment, so I can't give you a link), where the authors suggest to allow an e=
xpression as a lambda body.<br><br>Regards, Robert<br><br>2013. m=E1jus 18.=
, szombat 5:56:30 UTC+2 id=F5pontban Zhihao Yuan a k=F6vetkez=F5t =EDrta:<b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;">A quick thought
<br>
<br> []() try { return ...; } catch(...) { ... }
<br>
<br>So it's consistent with the function definition (a weak argument,
<br>ignore it if you want to argue), and can be used as a "try expression",
<br>like what exists in ML (expression level catch).
<br>
<br>Thoughts?
<br>
<br>--
<br>Zhihao Yuan, ID lichray
<br>The best way to predict the future is to invent it.
<br>______________________________<wbr>_____________________
<br>4BSD -- <a href=3D"http://4bsd.biz/" target=3D"_blank">http://4bsd.biz/=
</a>
<br></blockquote>
<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/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
<br />
<br />
------=_Part_13_699281.1369180459927--
.