<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 &lt;<a href="mailto:annulen@yandex.ru" class="">annulen@yandex.ru</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><br class="">19.04.2016, 22:11, "Anders Carlsson" &lt;<a href="mailto:andersca@apple.com" class="">andersca@apple.com</a>&gt;:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">&nbsp;On Apr 19, 2016, at 12:09 PM, Konstantin Tokarev &lt;<a href="mailto:annulen@yandex.ru" class="">annulen@yandex.ru</a>&gt; wrote:<br class=""><br class="">&nbsp;19.04.2016, 21:38, "Anders Carlsson" &lt;<a href="mailto:andersca@apple.com" class="">andersca@apple.com</a>&gt;:<br class=""><blockquote type="cite" class="">&nbsp;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="">&nbsp;This code compiles fine with GCC 4.8 with -std=c++1y flag:<br class=""><br class="">&nbsp;auto f(std::unique_ptr&lt;int&gt; ptr)<br class="">&nbsp;{<br class="">&nbsp;&nbsp;&nbsp;&nbsp;[value = std::move(ptr)] {return *value;};<br class="">&nbsp;}<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=""> &nbsp;&nbsp;&nbsp;[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 &nbsp;<a href="https://gcc.gnu.org/projects/cxx-status.html" class="">https://gcc.gnu.org/projects/cxx-status.html</a>&nbsp;(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>