19.04.2016, 22:22, "Anders Carlsson" <ander...@apple.com>: >> On Apr 19, 2016, at 12:21 PM, Konstantin Tokarev <annu...@yandex.ru> wrote: >> >> 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 > According do https://gcc.gnu.org/projects/cxx-status.html (which I linked in > original e-mail), GCC 4.5 has “partial” support. >
...and quote from release notes above explains that "partial" means "without parenthesized and brace-enclosed initializers". Also, you cannot be safe with GCC anyway, it often has bugs in newly introduced features which are discovered only after you write sufficiently sofisticated code using this feature. However, this is fine with me if you start using C++14 constructions incompatible with GCC 4.8 in WebKit2. I was asking only about allowing GCC 4.8 for WTF and JSC. -- Regards, Konstantin _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev