19.04.2016, 22:11, "Anders Carlsson" <ander...@apple.com>:
>>  On Apr 19, 2016, at 12:09 PM, Konstantin Tokarev <annu...@yandex.ru> wrote:
>>
>>  19.04.2016, 21:38, "Anders Carlsson" <ander...@apple.com>:
>>>  I’d like us to switch over to using C++14 in WebKit2 so we can get the new 
>>> generalized lambda capture (https://isocpp.org/files/papers/N3648.html), so 
>>> we can capture move-only types in lambdas. According to 
>>> https://gcc.gnu.org/projects/cxx-status.html that would require GCC 4.9.
>>
>>  This code compiles fine with GCC 4.8 with -std=c++1y flag:
>>
>>  auto f(std::unique_ptr<int> ptr)
>>  {
>>     [value = std::move(ptr)] {return *value;};
>>  }
>
> GCC 4.8 has “partial” support, which may or may not be OK for our purposes. 
> I’d rather be safe than sorry.

From https://gcc.gnu.org/gcc-4.9/changes.html#cxx:

"
G++ supports C++1y lambda capture initializers:

    [x = 42]{ ... };

Actually, they have been accepted since GCC 4.5, but now the compiler doesn't 
warn about them with -std=c++1y, and supports parenthesized and brace-enclosed 
initializers as well. 
"

So it states pretty clearly what is supported only since 4.9


>
> - Anders

-- 
Regards,
Konstantin
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to