Re: mozilla-central now compiles with C++14

2017-11-16 Thread gsquelart
On Friday, November 17, 2017 at 6:05:38 AM UTC+11, Jeff Walden wrote: > On 11/16/2017 08:35 AM, Ben Kelly wrote: > > I would like to use initialized lambda capture as I think it will allow > > move-only objects to be used in lambdas like this: > > > > UniquePtr uniqueThing = MakeUnique(); > >

Re: mozilla-central now compiles with C++14

2017-11-16 Thread Jim Blandy
Oh, this is great!! I was going to have to use horrible kludges to get around the lack of generic lambdas. On Wed, Nov 15, 2017 at 8:44 PM, Nathan Froyd wrote: > C++14 constructs are now usable in mozilla-central and related trees. > According to: > >

Re: mozilla-central now compiles with C++14

2017-11-16 Thread Jeff Walden
On 11/16/2017 08:35 AM, Ben Kelly wrote: > I would like to use initialized lambda capture as I think it will allow > move-only objects to be used in lambdas like this: > > UniquePtr uniqueThing = MakeUnique(); > nsCOMPtr r = NS_NewRunnableFunction([uniqueThing = > Move(uniqueThing)] () { >

Re: mozilla-central now compiles with C++14

2017-11-16 Thread Ben Kelly
On Wed, Nov 15, 2017 at 8:44 PM, Nathan Froyd wrote: > * initialized lambda captures > I would like to use initialized lambda capture as I think it will allow move-only objects to be used in lambdas like this: UniquePtr uniqueThing = MakeUnique(); nsCOMPtr r =

Re: mozilla-central now compiles with C++14

2017-11-16 Thread Jet Villegas
Nice! Binary literals sound cool for bit masks. I’d hate to have to read/write them for anything else :-) On Wed, Nov 15, 2017 at 20:44 Nathan Froyd wrote: > C++14 constructs are now usable in mozilla-central and related trees. > According to: > >

mozilla-central now compiles with C++14

2017-11-15 Thread Nathan Froyd
C++14 constructs are now usable in mozilla-central and related trees. According to: https://developer.mozilla.org/en-US/docs/Using_CXX_in_Mozilla_code this opens up the following features for use: * binary literals (0b001) * return type deduction * generic lambdas * initialized lambda captures