<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 19, 2016, at 12:21 PM, Konstantin Tokarev <<a href="mailto:annulen@yandex.ru" class="">annulen@yandex.ru</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><br class="">19.04.2016, 22:11, "Anders Carlsson" <<a href="mailto:andersca@apple.com" class="">andersca@apple.com</a>>:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""> On Apr 19, 2016, at 12:09 PM, Konstantin Tokarev <<a href="mailto:annulen@yandex.ru" class="">annulen@yandex.ru</a>> wrote:<br class=""><br class=""> 19.04.2016, 21:38, "Anders Carlsson" <<a href="mailto:andersca@apple.com" class="">andersca@apple.com</a>>:<br class=""><blockquote type="cite" class=""> I’d like us to switch over to using C++14 in WebKit2 so we can get the new generalized lambda capture (<a href="https://isocpp.org/files/papers/N3648.html" class="">https://isocpp.org/files/papers/N3648.html</a>), so we can capture move-only types in lambdas. According to <a href="https://gcc.gnu.org/projects/cxx-status.html" class="">https://gcc.gnu.org/projects/cxx-status.html</a> that would require GCC 4.9.<br class=""></blockquote><br class=""> This code compiles fine with GCC 4.8 with -std=c++1y flag:<br class=""><br class=""> auto f(std::unique_ptr<int> ptr)<br class=""> {<br class=""> [value = std::move(ptr)] {return *value;};<br class=""> }<br class=""></blockquote><br class="">GCC 4.8 has “partial” support, which may or may not be OK for our purposes. I’d rather be safe than sorry.<br class=""></blockquote><br class="">From <a href="https://gcc.gnu.org/gcc-4.9/changes.html#cxx:" class="">https://gcc.gnu.org/gcc-4.9/changes.html#cxx:</a><br class=""><br class="">"<br class="">G++ supports C++1y lambda capture initializers:<br class=""><br class=""> [x = 42]{ ... };<br class=""><br class="">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. <br class="">"<br class=""><br class="">So it states pretty clearly what is supported only since 4.9</div></div></blockquote><br class=""></div><div>According do <a href="https://gcc.gnu.org/projects/cxx-status.html" class="">https://gcc.gnu.org/projects/cxx-status.html</a> (which I linked in original e-mail), GCC 4.5 has “partial” support.</div><div><br class=""></div><div>- Anders</div><br class=""></body></html>